room_width

The width of the current room in pixels.

Syntax:

room_width;


Returns: Real


Description

This variable holds the width of the current room in pixels. You can change this variable to change the width of the room at any time.


Example:

if bbox_right > room_width
   {
   x += room_width - bbox_right;
   }

The above code checks to see if the current instance's sprite bounding box is greater than the width of the room, and if it is it moves the instance up.


Back: Rooms
Next: room_persistent
© Copyright YoYo Games Ltd. 2018 All Rights Reserved