background_height

Returns the height of the background with the given index in the current room.

Syntax:

background_height[0...7];


Returns: Real


Description

This read only variable returns the height of the image that has been used for the background_index of the same array value. Should you need to make a background fit a specific height, you should change the background_yscale.


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_xscale
© Copyright YoYo Games Ltd. 2018 All Rights Reserved