%object%.PartOfWho function

From ADRIFT 5 Manual Wiki
Jump to: navigation, search

If the selected static object is part of a character (ears, nose, feet, mouth etc.), this function will give the key of that character.


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



The initial location of the object is set using two drop-down lists on the description page. The first list sets the "Location of the object" property, and setting this determines which property will be set by the second list. When the "Location of the object" property is set to "Part of Character", the "Part of Who?" property of the character becomes available. Setting "Part of Who?" determines which character will be returned by the PartOfWho function.


How to use

To print the name of the character that this object is part of, as shown in the "Part of who" property, use the name function following this one. ie. "%object%.PartOfWho.Name"

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


  • %object%.PartOfWho.Name
If the referenced object is part of a character, this gives the characters name.
  • Object7.PartOfWho.CharOnWho.Name
If Object7 is the nose of a man who is sitting on a horse, this will give the name of the horse.
  • %object%.PartOfWho.CharInsideWhat.Name
If the referenced object is being held by a character who is inside of an object, this gives the name of that object.

<<< HeldByWhoObject FunctionsWornByWho >>>