FANDOM



This command will play an animated sprite.

Syntax
PLAY SPRITE Sprite Number, Start Frame, End Frame, Delay Value
Parameters
Sprite Number

Integer
The sprite number Start Frame Integer
The command defines the start frames to be played. These frames must have been previously set up using the CREATE ANIMATED SPRITE command End Frame Integer
The command defines the end frames to be played. These frames must have been previously set up using the CREATE ANIMATED SPRITE command Delay Value Integer
The Delay Value specifies the delay factor between animating frames. A low value is fast, a high value is slow

Returns

This command does not return a value.

Description

The command defines the start and end frames to be played. These frames must have been previously set up using the CREATE ANIMATED SPRITE command. The Delay Value specifies the delay factor between animating frames. A low value is fast, a high value is slow. The parameters should be specified using integer values. The frame number is incremented with each iteration of the PLAY SPRITE command. Therefore Play Sprite must be called for each frame of the animation to be displayed.

Example Code
create animated sprite 1,"manwalking.bmp",1,16,16,1

cls

sprite 1,100,100,1

play sprite 1,0,10,100

print "sprite frame ",sprite frame(1) 

do

loop

end
Community content is available under CC-BY-SA unless otherwise noted.