SPRITE_FILE_LOAD

SPRITE_FILE_LOAD N,F

LOADS THE PICTURE FROM THE FILE F (FORMAT BMP) TO THE SPRITE NUMBER N

  • Type: Command
  • Parameters: 2
  • Group: SPRITE

ACTION

The command SPRITE_FILE_LOAD N,F loads a picture to the SPRITE number N.

The file must be in the format BMP.

SYNTAX: SPRITE_FILE_LOAD N,F

  • N = SPRITE number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of SPRITE objects.
  • F = (absolute or relative) name of the file containing the picture.

USE

  • The command is used to load a picture (format BMP) to a SPRITE.

ERROR

  • If number N is not a correct expression.
  • If the SPRITE number N does not exist.
  • If F is not a correct string expression.
  • If file F 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"

SEE ALSO

SPRITE