Difference between revisions of "Character Functions"

From ADRIFT 5 Manual Wiki
Jump to: navigation, search
m (Links)
(Other Functions)
Line 94: Line 94:
 
:<font color="green">%character%</font>.Parent - The key of the location or object that immediately contains the character
 
:<font color="green">%character%</font>.Parent - The key of the location or object that immediately contains the character
  
== Other Functions ==
+
== User Properties ==
 
*If you create a new character property then a new function for accessing that property will be added to the list of functions for characters.
 
*If you create a new character property then a new function for accessing that property will be added to the list of functions for characters.
 
:The list will display the name of the property, but its [[key]] will be used in the function, so something like "%character%.Property12" will be entered into the text box.
 
:The list will display the name of the property, but its [[key]] will be used in the function, so something like "%character%.Property12" will be entered into the text box.
Line 100: Line 100:
 
*If you load a special-purpose library, then that library may add extra character properties/functions.
 
*If you load a special-purpose library, then that library may add extra character properties/functions.
 
:These functions will usually consist of a property key with a library prefix, so for a battle library it might be: "%character%.battleProperty6"
 
:These functions will usually consist of a property key with a library prefix, so for a battle library it might be: "%character%.battleProperty6"
 +
 +
== Object Group Functions ==
 +
If you enter the key of an object group, or use one of the [[File:IconGroup.jpg]] group property functions that return a list of objects, then entering a dot "." after it will popup this list of object group functions:
 +
 +
[[File:FunctionsCharacterGroup.jpg]]
  
  
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[Item functions|<<< Item functions]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Main Page]]</TD><TD ALIGN=CENTER>[[%character%.CharacterAtLocation_function|At which location >>>]]</TD></TABLE>
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[Item functions|<<< Item functions]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Main Page]]</TD><TD ALIGN=CENTER>[[%character%.CharacterAtLocation_function|At which location >>>]]</TD></TABLE>
 
[[Category:Functions]]
 
[[Category:Functions]]

Revision as of 10:34, 9 September 2013

The item functions for characters can be used to obtain the value of any text or integer property of the character, or to obtain a list of objects that the character is wearing or carrying.

Selecting the Character

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

  • In a task containing a %character% reference, using the reference will apply the character function to the character that the player entered in the command.
  • A specific character can be selected by using its key. eg. "Character12.Name"
  • The key of the character that the player is currently playing as, can be obtained using the %Player% function.
  • A location or object function can be used to obtain a character key, and the character function appended to it. eg "Object3.HeldByWho.Name" will print the name of the character that is holding Object3.
  • If the player is at the same location as exactly one other character, use the %AloneWithChar% function to get the key of that character.
  • If the player has started a conversation with another character, use the %ConvCharacter% function to get the key of that character.

IconWarning.png These names are CASE SENSITIVE. "%Character%." wont work, you must type "%character%."

Selecting the Function

The available functions can be listed by typing a dot (full-stop ".") immediately after the character reference "%character%", a character key, or function that returns a character key, in either a text box or an expression.

FunctionsCharacter.jpg

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 character will be ommited from the list.
  • Properties that you create and add to the characters 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.

Most of the listed functions simply return the current value of one of the properties on the character property tab:

CharacterProperties.jpg

Standard Functions

IconLocation.jpg Location properties

%character%.CharacterAtLocation - Displays the contents of the "At Location" property, which is a location KEY. Entering another dot after this will access the properties of that location.
%character%.Location - Displays the KEY of the characters current location. If the character is on or in an object this function will return the location that contains them.

IconCharacters.jpg Character properties

%character%.CharOnWho - Key of character that this character is sitting on.

IconText.jpg Text properties

%character%.Name - If "Known" property selected then print proper name, otherwise print the characters descriptor.
%character%.CharacterPosition - Standing, sitting or lying
%character%.CharacterProperName
%character%.Description
%character%.CharEnters
%character%.CharExits
%character%.Descriptor - Article, adjective and noun of character descriptor.
%character%.Gender - Male, female or unknown
%character%.CharacterLocation - "Hidden", "At Location", "On Object", "In Object" or "On Character".
%character%.ProperName
%character%.CharHereDesc

IconInteger.jpg Integer properties

%character%.MaxBulk - The max. number of tiny objects that this character can carry (If set for this character)
%character%.MaxWeight - Where a tiny object has weight = 1.

IconGroup.jpg Group properties

%character%.Held - A list of all objects held by the character
%character%.Worn - A list of all objects worn by the character
%character%.WornAndHeld - A list of all objects being worn and held by the character

IconGroup.jpg Group Filters

%object%.Contents(Characters).Known - Filter a character group so it only includes characters that are known to the player.
%object%.Contents(Characters).ShowEnterExit - Filter a character group so it only includes characters that generate a message when they enter or leave the players location.

IconDynamicObject.jpg Object properties

%character%.CharInsideWhat - The key of the container object that the character is inside of
%character%.CharOnWhat - The key of the supporter object that the character is on top of

IconStaticObject.jpg Item properties

%character%.Parent - The key of the location or object that immediately contains the character

User Properties

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

Object Group Functions

If you enter the key of an object group, or use one of the IconGroup.jpg group property functions that return a list of objects, then entering a dot "." after it will popup this list of object group functions:

FunctionsCharacterGroup.jpg


<<< Item functionsMain PageAt which location >>>