Difference between revisions of "%object%.HeldByWho function"

From ADRIFT 5 Manual Wiki
Jump to: navigation, search
(Created page with " <TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER><<< InLocation</TD><TD WIDTH="34%" ALIGN=CENTER>[[Object Function...")
 
(Properties)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
If the selected dynamic object is currently being held by a character, this function will give the key of that character.
  
 +
== 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.
  
 +
[[File:RestrictionObjectHeld.jpg]]
  
 +
== Properties ==
 +
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 "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.
  
 +
[[File:PropertyHeldByWho.jpg]]
  
 +
== 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_Functions|character function]].
  
 +
== Examples ==
 +
*<span style="color:green">%object%</span>.HeldByWho.Name
 +
:If the referenced object is being held by a character, this gives the characters name.
  
 +
*<span style="color:red">Object7</span>.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.
 +
 +
*<span style="color:green">%object%</span>.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.
  
  
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[%object%.InLocation function|<<< InLocation]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Object Functions]]</TD><TD ALIGN=CENTER>[[%object%.PartOfWho function|Part of who? >>>]]</TD></TABLE>
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[%object%.InLocation function|<<< InLocation]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Object Functions]]</TD><TD ALIGN=CENTER>[[%object%.PartOfWho function|Part of who? >>>]]</TD></TABLE>
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 07:32, 26 January 2013

If the selected dynamic object is currently being held by a character, this function will give the key of that character.

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.

RestrictionObjectHeld.jpg

Properties

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 "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.

PropertyHeldByWho.jpg

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.


<<< InLocationObject FunctionsPart of who? >>>