Difference between revisions of "Location Functions"
From ADRIFT 5 Manual Wiki
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.
- 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
- Long Location Description - The full description of the location
- %location%.LongLocationDescription
- Short Location Description - The name of the location
- %location%.ShortLocationDescription
- %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 Functions | Object-oriented functions | Expressions >>> |