Difference between revisions of "%character%.CharOnWho function"
(Created page with " <TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER><<< CharacterAtLocation</TD><TD WIDTH="34%" ALIG...") |
m (Link) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | 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. | ||
+ | [[File: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. | ||
+ | [[File: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_Functions|character function]]. | ||
+ | == Examples == | ||
+ | *<span style="color:red">Character7</span>.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. | ||
+ | *<span style="color:blue">%Player%</span>.CharOnWho.Position | ||
+ | :If the player is on a camel, this tells us if the camel is sitting down or standing up. | ||
+ | *<span style="color:green">%character%</span>.CharOnWho.MaxWeight | ||
+ | :The maximum weight that the animal the referenced character is sitting on can carry. | ||
+ | *<span style="color:red">Character23</span>.CharOnWho.CharInsideWhat.Name | ||
+ | :If Character23 is sitting on a character who is inside of an object, this gives the name of that object. | ||
− | + | <TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[%character%.Location function|<<< Location]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Character Functions]]</TD><TD ALIGN=CENTER>[[%character%.Name function|Name >>>]]</TD></TABLE> | |
− | + | ||
− | + | ||
− | <TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[%character%. | + | |
[[Category:Functions]] | [[Category:Functions]] |
Latest revision as of 02:06, 1 January 2013
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.
Contents
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.
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.
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.
<<< Location | Character Functions | Name >>> |