Location Functions

From ADRIFT 5 Manual Wiki
Jump to: navigation, search

The item functions for locations can be used to obtain the value of any text or integer property of the location, or the list of exits from the location.

Selecting the Location

These functions can be used with a specific location, or with any function or reference that returns a location key:

  • In a task containing a %location% reference, using the reference will apply the location function to the location that the player entered in the command.
  • A specific location can be selected by using its key. eg. "Location12.Name"
  • A character or object function can be used to obtain a location key, and the location function appended to it. eg "Character3.AtWhichLocation.Name" will print the name of the location at which Character3 is currently located.

Selecting the Function

The properties of locations can be listed by typing a dot (full-stop ".") immediately after the location reference "%location%", a location key, or a function that returns a location key, in a text box or expression.


Scroll down to the wanted property and click on it to insert the property key into the function.

  • Note that properties that are not relevant to a particular location will be ommited from the list.
  • Properties that you create for locations will be added to this list.
  • If you type part of the name of the property then the list will be reduced to show only those that match.
  • Instead of clicking with the mouse you can type enough of the properties name to bring it to the top of the list and press enter or tab.

Standard Functions

IconGroup.jpg Group properties

%location%.Characters.list - Lists the characters at this location
%location%.Characters.count - The number of characters at this location
  • Exits - The directions in which exits from this location exist.
  • NOTE: This function returns ALL exits, including those which are currently being blocked by restrictions. Use the %ListExits[%character%]% function to list available exits that a particular character may use from their current location.
%location%.Exits - Returns the %direction% keys of all exits from this location.
%location%.Exits.List - List all exits from this location.
%location%.Exits.Count - The total number of exits from this location
  • NOTE: The Objects list only includes objects that are set to be listed in location descriptions.
Static objects will only be listed if they have "Specifically list object in location descriptions" ticked.
Dynamic objects will only be listed if "Specifically exclude object from location description" is NOT ticked.
%location%.Objects.list - Lists the visible objects at this location
%location%.Objects.count - The number of visible objects at this location

IconText.jpg Text properties


IconLocation.jpg Location properties

%location%.LocationTo(%direction%) - The location in the referenced direction
%location%.LocationTo(NorthWest) - The location to the north-west from this location

User Properties

  • If you create a new location property then a new function for accessing that property will be added to the list of functions for locations.
The list will display the name of the property, but its key will be used in the function, so something like "%location%.Property12" will be entered into the text box.
  • If you load a special-purpose library, then that library may add extra location properties/functions.
These functions will usually consist of a property key with a library prefix, so for a battle library it might be: "%location%.battleProperty6"

<<< Object PartOfWhatItem functionsExits >>>