SPRITE_DELETE

SPRITE_DELETE N

DELETES THE SPRITE NUMBER N

  • Type: Command
  • Parameter: 1
  • Group: SPRITE

ACTION

The command SPRITE_DELETE N deletes the SPRITE designated by its number N.

The number N becomes free and can be reused to create a new SPRITE.

SYNTAX: SPRITE_DELETE N

  • N = SPRITE number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of SPRITE objects.

USE

  • The command is used to delete a SPRITE.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of SPRITE objects.
  • If number N is not greater than 0.
  • If the SPRITE number N does not exist.

EXAMPLE

rem create a 2D world number 1

scene2d 1

rem load a background picture

file_load 1,"city.bmp"

rem create a SPRITE number 1

sprite 1

rem load a picture to the SPRITE

sprite_file_load 1,"alien.bmp"

rem wait for 1 seconde

wait 1000

rem delete ce SPRITE

sprite_delete 1

SEE ALSO

SPRITE

SPRITE_DELETE_ALL