SPRITE

This command will set the position and image number of the specified sprite.

  Syntax
SPRITE Sprite Number, XPos, YPos, Image Number
  Parameters
Sprite Number
Integer
The sprite number
XPos
Integer
The x position of the sprite
YPos
Integer
The y position of the sprite
Image Number
Integer
The image number that will be used for the sprite

  Returns

This command does not return a value.

  Description

Providing you are using a valid image number from a previous call to the GET IMAGE command, and the position of the sprite is in the screen area, you will see your sprite displayed. You can move your sprite by calling the sprite command with new position coordinates. You can animate your sprite by calling this command with different image numbers to create the effect of animation. You are able to have over sixty thousand sprites on the screen at any one time, but it is advisable to restrict yourself to a few hundred sprites for speed critical programs. The parameters should be specified using integer values.

  Example Code
cls
load image "man.bmp",1
sprite 1,100,100,1
wait 1000*8
do
cls
paste sprite 1,mousex(),mousey()
loop
end
  See also

SPRITE Commands Menu
Index