Skip to content
aubergine10 edited this page Oct 19, 2015 · 1 revision

Were you looking for [Object script global](Objects (Global)) or Objects category?

PA Bug 9598 - room tooltip fail

##Overview

Rooms

The AdjacentObject requirement prevents a Room from becoming active until the specified object has been constructed adjacent to it (see Notes).

##Syntax

The setting is used in materials.txt and must be within a BEGIN Room ... definition block. It can be used multiple times per definition block, once per required <objectId>.

    BEGIN Requirement Type AdjacentObject Id <objectId> END

Where <objectId> specifies an Object that must be adjacent to the room.

##Example

Based on the [Shop room](Shop (Room)) but with one extra object to illustrate you can use this requirement multiple times:

    BEGIN Requirement Type AdjacentObject Id ShopFront       END
    BEGIN Requirement Type AdjacentObject Id SomeOtherObject END

##Notes

Objects of the specified type built inside the room will not count towards the requirement. The object has to be outside the room, but touching the room.

For example, if the room was surrounded by walls, the object would need to be built on a wall (like the ShopFront in the example above).

If the specified object has to be built on a wall, make sure it has the Properties BuiltOnWall setting to allow that to happen (or remove its BlockedBy Wall restriction).

A red warning indicator will appear over any rooms not meeting the requirement.

This setting also causes hidden objects to reappear in the "Objects" menu when the room is near the middle of the map window. The object will also have a white border around its icon in the "Objects" menu making it easier to find, regardless of whether it was previously hidden or not. Objects can be hidden from the menu by giving them the Properties RoomSpecific setting.

###data/scripts/

Room requirements are not currently exposed by the scripting API :(

##See Also

Clone this wiki locally