%object%.HeldByWho function
If the selected dynamic object is currently being held by a character, this function will give the key of that character.
Contents
Requirements
This function can only be used where the object is known to be held by a character, or by using the following restriction in a task or alternate description to ensure that it is.
Properties
When the "Location of the object" property is set to "Held by Character", the "Held by Who?" property of the character becomes available. Setting "Held by Who?" determines which character will be returned by the HeldByWho function.
How to use
To print the name of the character holding this object, as shown in the "Held by character?" property, use the name function following this one. ie. "%object%.HeldByWho.Name"
This function returns a character key, so it can be followed by any character function.
Examples
- %object%.HeldByWho.Name
- If the referenced object is being held by a character, this gives the characters name.
- Object7.HeldByWho.CharOnWho.Name
- If Character7 is a gun being held by a man who is sitting on a horse, this will give the name of the horse.
- %object%.HeldByWho.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.
<<< InLocation | Object Functions | Part of who? >>> |