SPRITE_TARGET_IS

SPRITE_TARGET_IS N

DESIGNATES THE OBJECT NUMBER N (SCENE2D) AS RECEIVER OF SPRITES

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

ACTION

The command SPRITE_TARGET_IS N designates the object number N (SCENE2D) which will receive the next created SPRITES. This object becomes the "SPRITE target" object.

By default, the "SPRITE target" object is the first SCENE2D created.

SYNTAX: SPRITE_TARGET_IS N

  • N = number of object (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 create SPRITES on several SCENE2D.

ERROR

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

EXAMPLE

rem create a SCENE2D number 2

scene2d 1

rem create a SPRITE on this SCENE2D

sprite 1

rem create another SCENE2D number 2

scene2d 2

rem designate this second SCENE2D as the SPRITE target

sprite_target_is 2

rem create a SPRITE on this second SCENE2D

sprite 2

SEE ALSO

SPRITE

NUMBER_SPRITE_TARGET