SHRINKS OR STRETCHES THE WIDTH OF TH SPRITE NUMBER N
ACTION
The command SPRITE_X_SCALE N,CX scales the size of the SPRITE designated by its number N, along the X axis that is its width, by the coefficient CX. The size on Y is unchanged (its height).
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).
SYNTAX:
SPRITE_X_SCALE N,CX
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 on X axis
sprite_x_scale 1,2
SPRITE_X_SCALE
SPRITE_X_SCALE N,CX
SEE ALSO
SPRITE_Y_SCALE