Objects

This section discusses the objects tab in the room editor.

The objects tab is where you can select an object and then place an instance of that object into the selected room.

First you must decide which object from your resource tree you wish to add, and this can be done by clicking on the Object to add with left mouse menu button, or by clicking the large area above where the object sprite is normally shown. If the object has no sprite, this box will be blank, but if it does, the sprite will be shown on a chequered background along with its x/y origin which indicates how the instance will be aligned with the grid once placed in the room editor.

Instance properties

Once you have selected the correct object, you can now place instances of it within the room by clicking anywhere, with the instance being snapped to the grid (if you have the snap values other than 0). There are a number of additional options which will be made available to the right of the object image that you can then change for the instance that you have just placed within the room. These are:

You should note that a selected instance can also be scaled by clicking on one of the corner "nodes" that mark the bounding box of the instance when you select it in the room editor. By clicking the node and dragging the mouse, you can change the image scale, and these changes will be reflected in the values of the above mentioned areas. You can also use the cursor keys to move an instance of an object placed in the room and so "fine-tune" the position easier. By default this is a shift of 1 pixel at a time, however you can modify this behaviour using the following keys:

Delete Underlying

The normal behaviour for placing instances within the room is that if you place an instance on top of another one, the original instance is overlapped by the new one. Generally this is what you want to happen, but not always, and so there is a check-box at the bottom of the objects tab which you can flag to make any new instances delete those that were place before in the same position. The "hitbox" used to calculate whether an instance is over another one or not is the bounding box taken from the collision mask defined for the sprite that the instance uses. if the instance has no sprite, then only those that have been previously placed at the same position will de removed.

Shortcuts

There are also a number of keyboard shortcuts that can be used to make your life easier when placing instances (you can open the following window that shows them all from the toolbar at the top of the room editor):


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