.present?
XanMag
23 Mar 2018, 21:53Let's pretend. I have a violin. I can play violin anywhere in the game. If the Pixie is in the room, Pixie will throw tomatoes at me. If the Pixie is not in the room, I simply print a message. But, the Pixie can move around.
My question: What does if (the Pixie.present) { }
do? Will it check to see if the Pixie is in the room? Or did I just make that up? Thanks.

Doctor Agon
23 Mar 2018, 22:17You can do {here pixie:Pixie throws tomatoes at you.}
{here object:text} Displays the text only if the given object is in the current room (but not if in the player’s inventory or in a container in the room).
The beach is long, and the sand almost white. {here mary:You can see Mary, building a sand castle.}
{nothere object:text} Displays the text only if the given object is NOT in the current room.
The beach is long, and the sand almost white. {nothere mary:You wonder where Mary could be.}
XanMag
23 Mar 2018, 22:46Ah. Clever. I'm sure that will meet my needs! Thanks.
XanMag
23 Mar 2018, 23:22Is “Is Reachable” in the GUI the same as “In the Room”?

Doctor Agon
24 Mar 2018, 00:04Reachable Objects
Quest makes a distinction between objects a player can reach and objects the player can see. Obviously with most objects, the player can do both, but this can be important in some situations.
Objects in a container are considered reachable if the container is open. If an item’s visible attribute is not set (i.e., it is false), or if the room is dark and the object is not a light source, then the object is not reachable.
• ScopeReachableInventory Items carried that are also reachable.
• ScopeReachable All objects in this scope can be interacted with directly by the player, items in the current room or in the inventory that are reachable.
• ScopeReachableForRoom All objects in the room that are reachable by the player. If this is the current room, then it will include items in the inventory that are reachable.
• ScopeReachableNotHeld These objects are in the current room and can be interacted with, but they’re not in the player’s inventory.
• ScopeReachableNotHeldForRoom
This is taken from the following page link: http://docs.textadventures.co.uk/quest/scopes.html
Hope that helps
XanMag
24 Mar 2018, 00:58So I can use ScopeReachable to check if an NPC is in the same room as the player as long as I don't stuff said NPC in a dark room or a closed container? Good to know. Thanks! =)

Doctor Agon
28 Apr 2018, 23:00I've recently been having some fun (using that word advisedly , head scratching more accurately, tearing hair out would be another on) with this. And I remembered this thread, so if anyone else is interested.
You can also check, particularly for containers, if the object has been moved.
{if object.hasbeenmoved:text}
or {if not object.hasbeenmoved:text}
I also assume that since these are True or False statements, either would also work:
{either object.hasbeenmoved:text|text}
Hope this helps anyone else.