Newbie: Checking whether an object is present in a room

philtepper
30 Dec 2013, 18:31
I've been looking in vain for 'object is in room' alongside 'player is in room' and the other entries in the 'if' script expression drop-down. How in the Quest UI can I check whether a particular object is present in a particular room?

jaynabonne
30 Dec 2013, 19:03
An object (including the player) is in a room if the object's parent is the room (ignoring things like objects being inside containers. That adds another level. If you need that, then we can work it out).

So if you have an object "apple" and a room "kitchen", then the apple is in the kitchen if "apple.parent = kitchen".

philtepper
30 Dec 2013, 22:14
Many thanks Jaynabonne!