%character%.CharInsideWhat function

From ADRIFT 5 Manual Wiki
Revision as of 01:05, 13 December 2012 by Saabie (Talk | contribs) (Created page with "If the selected character is currently inside of an object (Hiding in a wardrobe, inside a car etc.) then this function will give the key of that object. == Requirements == This...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If the selected character is currently inside of an object (Hiding in a wardrobe, inside a car etc.) then this function will give the key of that object.

Requirements

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

RestrictionCharInObject.jpg

Properties

When the "Location of the character" property is set to "In Object", the "Inside Which Object?" property of the character displays the name of the object that this character is inside of. Setting "Inside Which Object?" determines which object will be returned by the CharInsideWhat function.

PropertyCharInsideWhat.jpg

How to use

To print the name of the object, as shown in the "Inside Which Object?" property, use the name function following this one. ie. "%character%.CharInsideWhat.Name"

This function returns an object key, so it can be followed by any object function.

Examples

  • Character7.CharInsideWhat.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%.CharInsideWhat.Position
If the player is on a camel, this tells us if the camel is sitting down or standing up.
  • %character%.CharInsideWhat.MaxWeight
The maximum weight that the animal the referenced character is sitting on can carry.
  • Character23.CharInsideWhat.CharInsideWhat.Name
If Character23 is sitting on a character who is inside of an object, this gives the name of that object.


<<< CharacterAtLocationCharacter FunctionsName >>>