Object-oriented functions
The object-oriented function syntax uses a dot character ("." the Full-Stop) between an item key and one or more property keys, to allow direct access to the value of a property in text or an expression without having to use the more cumbersome %PropertyValue[]% function to access each one.
Adrift recognises an object-oriented function by the presence of a dot joining two words with no space between them. Therefore you dont need to use the % or <# delimiters to separate them from normal text.
"Object2.Name" is a property, "Object2." is just the full-stop at the end of a sentance, and "42.56" is a number.
The first word must be a recognised key with the first letter capitalised to activate the list of properties and functions when you press the "."
Typing "Player." will activate the list, but "player." will not.
These are quite powerfull because you can keep adding property names to the end of the function to get more complex information.
For example: "Character2.CharacterAtLocation.Exits.Count" can be used to display the number of accessable exits from the current location of character 2.
The item key can come from a function (eg. %Player%.ProperName) or a reference (eg. %character%.ProperName)
These properties return the key of a location. These would not normally be displayed to the player, but can be used to access properties of the location by adding another dot followed by the name of a property that locations can have.
These properties return the key of a character.
Returns text that can be displayed or stored in a text variable
Returns a number that can be displayed, stored in an integer variable, or used in an expression.
These are basically a list of key names which are displayed with a pipe symbol "|" between each one.
eg. %Player%.CharacterAtLocation.Exits is displayed as "North|East|South"
Group properties themselves have two properties, ".List" to list the members of the group, and ".Count" to return the number of group members as an integer value, and some may also have container properties.
Some group properties can also be used as functions which use parameters to filter the results.
For example the "Children" group can contain both Objects and Characters, and these can be either on or inside the parent object.
The function .Children(Objects,On) will filter the contents of the group to return only those which are objects and which are on top of the parent object.
Returns the key of an object
Returns the key of an item (can be either a Character, an Object, or a Location)
Function Lists
<<< Key | Main Page | Expressions >>> |