SHRINKS OR STRETCHES THE WIDTH AND HEIGHT OF THE SPRITE NUMBER N
ACTION
The command SPRITE_SCALE N,CX,CY scales the size of the SPRITE designated by its number N, along the X axis that is its width, by the coefficient CX and along the Y axis that is its height, by the coefficient CY.
In a SCENE2D, the X axis is the horizontal axis, the Y axis is the vertical axis.
If CX=1, no scale is made on its width.
If CX>1, the SPRITE is stretched on the X axis (width).
If CX<1, the SPRITE is shrinked on the X axis (width).
If CY=1, no scale is made on its height.
If CY>1, the SPRITE is stretched on the Y axis (height).
If CY<1, the SPRITE is shrinked on the Y axis (height).
SYNTAX:
SPRITE_SCALE N,CX,CY
USE ERROR 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 place the SPRITE on the SCENE2D
sprite_x_position 1,150
sprite_y_position 1,250
rem double the size of the SPRITE
sprite_scale 1,2,2
SPRITE_SCALE
SPRITE_SCALE N,CX,CY
SEE ALSO
SPRITE_X_SCALE
SPRITE_Y_SCALE