- This function will not work for static objects, or if the object is in or on another object, is held or worn by a character, or if it is hidden.
- If you cannot be certain that the object is in a location, then you must use the following restriction in the task or an alternate description to ensure that it is.
The initial location of the object is set using two drop-down lists on the description page. The first list sets the "Location of the object" property, and setting this determines which property will be set by the second list. When the "Location of the object" property is set to "In Location", the "In Location" property will become available. Setting "In Location" determines which location will be returned by the InLocation function.
How to use
Any of the Location Functions can be appended to the InLocation function to display a property of the location of an object.
In a text box you would use this function to obtain the location of an object so that you can then display one of the properties of that location. When you enter another full-stop after this function, you will be shown a list of the Location Functions that can be used with it.
As well as the %object% reference, you can use the key of an object, or any function that returns the key of a dynamic object, with this function:
- This example obtains the current location of the object who's key is Object4, then prints the short location description of that location.
- In a task with an %object% reference, this function first finds the parent (location of) the referenced object. The object must be be in or on a dynamic object for the InLocation function to work. The Objects.List function then lists all of the objects at this location.
|<<< AtLocation||Object Functions||HeldByWho >>>|