SPRITE_DELETE_ALL

SPRITE_DELETE_ALL

DELETES ALL THE SPRITES

  • Type: Command
  • Parameter: 0
  • Group: SPRITE

ACTION

The command SPRITE_DELETE_ALL deletes all the existing SPRITES.

The numbers become free again and can be reused to create new SPRITES.

SYNTAX: SPRITE_DELETE_ALL

USE

  • The command is used to delete a lot of SPRITE without using their individual numbers.

ERROR

  • None.

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 1

sprite_file_load 1,"alien.bmp"

rem place the SPRITE on the SCENE2D

sprite_x_position 1,10

sprite_y_position 1,10

rem create a SPRITE number 2

sprite 2

rem load a picture to the SPRITE 2

sprite_file_load 2,"alien.bmp"

rem place the SPRITE on the SCENE2D

sprite_x_position 2,100

sprite_y_position 2,100

rem wait for 1 seconde

wait 1000

rem delete all the SPRITES

sprite_delete_all

SEE ALSO

SPRITE

SPRITE_DELETE