%character%.Location function

From ADRIFT 5 Manual Wiki
Jump to: navigation, search

This function returns the key of the location at which the selected character is currently located.


  • This function will always determine the characters location, regardless of whether they are currently inside or on top of an object or another character, however it will not work if the character is "Hidden".
  • If you cannot be certain that the character is not hidden, then you must use the following restriction in the task or an alternate description to ensure that it is:



When the "Location of the character" property is set to "At Location", this function will return the location selected in the "At Which Location" property. If the character is inside or on an object, or on another character, this function will recursively check the parent of that object or character until it finds the location in which all of them are located.


How to use

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

Any of the Location Functions can be appended to the Location function to display a property of the location of a character.


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

  • Character4.Location.ShortLocationDescription
This example obtains the current location of the character who's key is Character4, then prints the short location description of that location.
  • %AloneWithChar%.Location.LongLocationDescription
If there is only one other character at the same location as the player character, then this will print the long description of that location.
  • %ConvCharacter%.Location.Exits.List
If the player is currently in conversation with another character, then this functions will list all of the available exits from that characters current location.
  • %object%.Parent.Location.Objects.List
In a task with an %object% reference, this function first finds the parent (location of) the referenced object. The object must be being held by a character for the Location function to work. The Objects.List function then lists all of the objects at this location.

<<< CharacterAtLocationCharacter FunctionsCharOnWho >>>