SPRITE_EXISTS()

SPRITE_EXISTS(N)

RETURNS 1 IF THE SPRITE NUMBER N EXISTS, 0 OTHERWISE

  • Type: Function
  • Parameter: 1
  • Group: SPRITE

ACTION

The fonction SPRITE_EXISTS(N) returns 1 the SPRITE number N exists and 0 otherwise.

SYNTAX: Result=SPRITE_EXISTS(N)

  • N = SPRITE number (integer or real).

USE

  • The function SPRITE_EXISTS() is used to know if a SPRITE exists.

ERROR

  • If number N is not a correct expression.

EXAMPLE

rem test if the SPRITE number 1 exists

if sprite_exists(1)=1 then print "the SPRITE exists"

SEE ALSO

SPRITE