background_yscale

This variable controls the scaling along the y axis of the given background number.

Syntax:

background_yscale[0...7]


Returns: Real


Description

This variable returns the y axis scale of the image that has been used for the background_index of the same array value. The default value is 1, but this can be set to other values to stretch the background image.



NOTE: You cannot scale backgrounds in any way when using the HTML5 target module without having first enabled WebGL (in the Global Game Settings).


Example:

if room_height != background_height[0]
   {
   background_yscale[0] = 1 * (room_height / background_height[0]);
   }

The above code will scale background to fit the height of the room.


Back: Backgrounds
Next: background_index
© Copyright YoYo Games Ltd. 2018 All Rights Reserved