%object%.AtLocation function

From ADRIFT 5 Manual Wiki
Revision as of 06:02, 13 December 2012 by Saabie (Talk | contribs) (fixed link)

Jump to: navigation, search

This function returns the key of the location at which the selected static object is located.

Requirements

  • This function will not work for dynamic objects, or if the object is part of an object or character, or if it is hidden.
If you cannot be certain that the object is at a location, then you must use the following restriction in the task or an alternate description to ensure that it is.

RestrictionObjectAtLocation.jpg

Properties

When the "Location of the object" property is set to "Single Location", the "At Location" property will become available. Setting "At Location" determines which location will be returned by the AtLocation function.

PropertySingleLocation.jpg

How to use

AtLocation obtains the key of the location. To display the name of the location, append the "ShortLocationDescription" function to this function. ie. "%object%.AtLocation.ShortLocationDescription".

Any of the Location Functions can be appended to the AtLocation function to display a property of the location of an object.

Examples

As well as the %object% reference, you can use the key of an object, or any function that returns the key of an object with this function:

  • Object4.AtLocation.ShortLocationDescription
This example obtains the location of the object who's key is Object4, then prints the short location description of that location.
  • %object%.Parent.AtLocation.Objects.List
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 an another object for the AtLocation function to work. The Objects.List function then lists all of the objects at this location.


<<< Character FunctionsObject FunctionsInLocation >>>