The SPRITE OFF command removes all sprites from your display, and all current Sprite movements are aborted. To re-start them, the movement pattern must be initialised again. (Please see the AMAL facilities explained in Chapter 7.6). If an optional Sprite number is given, only that Sprite will be de-activated and removed from the screen.
Please note that Sprites are de-activated every time the AMOS Professional editor is called up. Sprites are automatically returned to their original positions the next time Direct Mode is entered.
X SPRITE
function: return x-coordinate of a Sprite
x=X Sprite(number)
This function returns the current x-coordinate of the Sprite whose number is given in brackets. The Sprite number can range from 0 to 63, and positions are given in hardware coordinates. Use X SPRITE to check if a Sprite has passed off the edge of the screen.
Y SPRITE
function: return y-coordinate of a Sprite
y=Y Sprite(number)
This gives the vertical position of the specified Sprite, measured in hardware coordinates.
I SPRITE
function: return current image number of a Sprite
image=I Sprite(number)
This function returns the current image number being used by the specified Sprite. If the Sprite is not displayed, a value of zero will be returned.
Conversion Functions
X SCREEN
function: convert hardware x-coordinate to screen x-coordinate
x=X Screen(xcoordinate)
x=X Screen(screen number,xcoordinate)
Y SCREEN
function: convert hardware y-coordinate to screen y-coordinate
y=Y Screen(ycoordinate)
y=Y Screen(screen number,ycoordinate)
These functions transform a hardware coordinate into a screen coordinate, relative to the current screen. If the hardware coordinates lie outside of the screen, both functions will return relative offsets from the screen boundaries. An optional screen number may be included, in which case the coordinates will be returned relative to that screen.