room_width (Game Maker)

(( Game Maker 6.1, 7 )

room_width - width of the current room in pixels.


room_width is the width of the current room. You should note that this is not the width of the view.


Putting An Instance In Center of Room

If the origin of the sprite is in the center, you can put an instance in the center of a room by the following code.

x = room_width/2;
y = room_height/2;

Related Pages

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.