Difference between revisions of "%character%.CharOnWho function"

From ADRIFT 5 Manual Wiki
Jump to: navigation, search
m
m
Line 15: Line 15:
  
 
This function returns a character [[key]], so it can be followed by any [[Character_Functions|character function]].
 
This function returns a character [[key]], so it can be followed by any [[Character_Functions|character function]].
 
  
 
== Examples ==
 
== Examples ==

Revision as of 02:09, 11 December 2012

If the selected character is currently sitting on top of another character (such as a bird on a mans shoulder or a man riding a horse) then this function will give the key of that character.

Requirements

This function can only be used where the character is known to be on another, or by using the following restriction in a task or alternate description to ensure that it is.

RestrictionCharOnChar.jpg

Properties

When the "Location of the character" property is set to "On Character", the "On Which Character?" property of the character displays the name of the character that this character is sitting on. Setting "On Which Character?" determines which character will be returned by the CharOnWho function.

PropertyCharOnWho.jpg

How to use

To print the name of the ridden character, as shown in the "On which character?" property, use the name function following this one. ie. "%character%.CharOnWho.Name"

This function returns a character key, so it can be followed by any character function.

Examples

Character7.CharOnWho.CharOnWho.Name 
If Character7 is a parrot sitting on a man who is sitting on a horse, this will give the name of the horse.


%Player%.CharOnWho.Position 
If the player is on a camel, this tells us if the camel is sitting down or standing up.


%character%.CharOnWho.MaxWeight 
The maximum weight that the animal the referenced character is sitting on can carry.


Character23.CharOnWho.CharInsideWhat.Name 
If Character23 is sitting on a character who is inside of an object, this gives the name of that object.


<<< CharacterAtLocationCharacter FunctionsName >>>