bmap_for_entity (ENTITY* entity, var frame)
Returns a bmap pointer to the entities' texture.Parameters:
| entity |
A pointer to a sprite, model, terrain, or map entity |
| frame |
Number of frame or skin to determine the texture. At 0 the current
frame or skin will be used |
Returns:
Pointer to a bmap if operation was
successfully, otherwise 0.
Speed:
Fast
Remarks:
- Functions like media_play, bmap_for_screen, bmap_to_uv etc.
can use this bmap pointer.
- If several entities share the
same file, they will also return
the same bmap pointer.
- The bmap can be temporary
assigned to other objects, like panels, but
won't be saved by the game_save instruction.
- In case of a map entity, the frame variable
gives the number of the texture to be returned,
starting with 1. If it's higher than the number
of textures in the map, 0 is returned.
Example:
// capture a screenshot in a sprite
bmap_for_screen(bmap_for_entity(my,0),1,0);
See also:
bmap_for_screen