%character%.CharOnWhat function

From ADRIFT 5 Manual Wiki
Revision as of 01:21, 13 December 2012 by Saabie (Talk | contribs) (Created page with "If the selected character is currently on top of a supporter object (sitting on a chair, lying on a bed etc.) then this function will give the key of that object. == Requirement...")

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

If the selected character is currently on top of a supporter object (sitting on a chair, lying on a bed 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 on a supporter object, or by using the following restriction in a task or alternate description to ensure that it is.

RestrictionCharOnObject.jpg

Properties

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

PropertyCharOnWhat.jpg

How to use

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

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

Examples

  • Character7.CharOnWhat.Description
If Character7 is a parrot sitting on a perch, this will give the description of the perch.
  • %Player%.CharOnWhat.StaticLocation
If the player on a bed that is in a bedroom, this gives the short description of the bedroom.
  • %character%.CharOnWhat.Weight
The weight of the object that the referenced character is sitting on top of.


<<< CharInsideWhatCharacter FunctionsParent >>>