If the selected dynamic object is being worn by a character, this function will give the key of that character.
This function can only be used where the object is known to be being worn by a character, or by using the following restriction in a task or alternate description to ensure that it is.
- You don't need to check the "Object is wearable" property, as this only prevents the player from using the "wear %object%" command.
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 "Worn by Character", the "Worn by who" property of the character becomes available. Setting "Worn by who" determines which character will be returned by the WornByWho function.
How to use
To print the name of the character that is currently wearing this object, as shown in the "Worn by who" property, use the name function following this one. ie. "%object%.WornByWho.Name"
- If the referenced object is being worn by a character, this gives the characters name.
- If Object7 is the shirt of a man who is sitting on a horse, this will give the name of the horse.
- If the referenced object is being worn by a character who is inside of an object, this gives the name of that object.
|<<< PartOfWho||Object Functions||ReadText >>>|