file$ - filename of image file to be used framesX - number of frames horizontally in animation file framesY (optional) - number of frames vertically in animation file (Default=1l) flags (optional): * Default parent (optional) - give an alternative entity in
which to attach the sprite to |
Creates a quad entity from an animation image file. The entity is then attached to the sprite pivot (or parent if supplied). To set up the animation correctly just specify the amount of frames horizontally (and vertically if more than 1) when loading the animation. Example: This is how you would load the following12 frame animation file: myanim.bmp
sprite=LoadAnimImage("myanim.bmp",4,3) The sprites width is scaled to the pixel width of the
image file divided by the number of frames in specified
in framesX. The number of frames should be at least 2. To change/update the sprites animation frames use the DrawImage3D
command. This has an optional 'frame' parameter. The optional flags parameter can be used to apply different effects to the texture. Default value is 4. * NOTE: It is important to initialise the sprite
display system first! Alternatively, you might want to attach the sprite to
your own pivot/entity. *IMPORTANT* See Also: FreeImage3D |
Include "Sprite Control.bb" SpriteGraphics3D 640,480 framesAcross=6 ; 6 columns of images mysprite=LoadAnimImage3D("myimage.bmp",TOTALFRAMES) Repeat RenderWorld End |