Difference between revisions of "Location Functions"

From ADRIFT 5 Manual Wiki
Jump to: navigation, search
m (formatting)
(useage)
Line 27: Line 27:
 
:<font color="green">%location%</font>.Objects.list - Lists the objects at this location
 
:<font color="green">%location%</font>.Objects.list - Lists the objects at this location
 
:<font color="green">%location%</font>.Objects.count - The number of objects at this location
 
:<font color="green">%location%</font>.Objects.count - The number of objects at this location
 +
 +
== Useage ==
 +
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.
  
  
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[Object Functions|<<< Object Functions]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Object-oriented functions]]</TD><TD ALIGN=CENTER>[[Expressions|Expressions >>>]]</TD></TABLE>
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[Object Functions|<<< Object Functions]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Object-oriented functions]]</TD><TD ALIGN=CENTER>[[Expressions|Expressions >>>]]</TD></TABLE>
 
[[Category:Functions]]
 
[[Category:Functions]]

Revision as of 04:55, 20 November 2012

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.

FunctionsLocation.jpg

IconGroup.jpg Group properties

  • Exits - The directions that the player can move from this location
%location%.Exits - List available exits from this location (those not blocked by a restriction)
%location%.Exits.List - List available exits from this location (those not blocked by a restriction)
%location%.Exits.Count - The number of available exits from this location

IconText.jpg Text properties

%location%.LongLocationDescription
%location%.ShortLocationDescription

IconDynamicObject.jpg Object properties

%location%.Objects.list - Lists the objects at this location
%location%.Objects.count - The number of objects at this location

Useage

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.


<<< Object FunctionsObject-oriented functionsExpressions >>>