Difference between revisions of "%object%.LockStatus 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><<< StaticLocation</TD><TD WIDTH="34%" ALIGN=CENTER>[[Obj...")
 
Line 1: Line 1:
 +
The LockStatus function returns the single word "Locked" if the object has the property "Object can be locked".
  
 +
== Properties ==
 +
The "Object can be locked" property is only available if the "Object can be open and closed" property has been selected.
 +
Selecting the "Object can be locked" property changes the "Open status" property from two radio-buttons marked "Open" and "Closed", to a drop-down list with the third option "Locked".
  
 +
The "Key for Lock" property also becomes available. This property '''must''' be set to a dynamic object that will be used as the key to unlock this object.
  
 +
[[File:PropertyObjectLockable.jpg]]
  
 +
== How to use ==
 +
This function simply returns the word "Locked" if the object is lockable, and does nothing if the object can't be locked.
 +
No further functions can be appended to it.
  
 +
To print the actual state of the object, whether it is "Open", "Closed" or "Locked", use the [[%object%.OpenStatus function]] instead.
  
 +
== Examples ==
 +
*<span style="color:red">Character7</span>.LockStatus
 +
: Prints the word "Locked" if the object with the [[key]] "Character7" can be locked.
  
 
+
*<span style="color:green">%object%</span>.LockStatus
 
+
: Prints the word "Locked" if the referenced object, in a task with an %object% reference, can be locked.
 
+
 
+
 
+
  
  
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[%object%.StaticLocation function|<<< StaticLocation]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Object Functions]]</TD><TD ALIGN=CENTER>[[%object%.OpenStatus function|OpenStatus >>>]]</TD></TABLE>
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[%object%.StaticLocation function|<<< StaticLocation]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Object Functions]]</TD><TD ALIGN=CENTER>[[%object%.OpenStatus function|OpenStatus >>>]]</TD></TABLE>
 
[[Category:Functions]]
 
[[Category:Functions]]

Revision as of 04:14, 14 December 2012

The LockStatus function returns the single word "Locked" if the object has the property "Object can be locked".

Properties

The "Object can be locked" property is only available if the "Object can be open and closed" property has been selected. Selecting the "Object can be locked" property changes the "Open status" property from two radio-buttons marked "Open" and "Closed", to a drop-down list with the third option "Locked".

The "Key for Lock" property also becomes available. This property must be set to a dynamic object that will be used as the key to unlock this object.

PropertyObjectLockable.jpg

How to use

This function simply returns the word "Locked" if the object is lockable, and does nothing if the object can't be locked. No further functions can be appended to it.

To print the actual state of the object, whether it is "Open", "Closed" or "Locked", use the %object%.OpenStatus function instead.

Examples

  • Character7.LockStatus
Prints the word "Locked" if the object with the key "Character7" can be locked.
  • %object%.LockStatus
Prints the word "Locked" if the referenced object, in a task with an %object% reference, can be locked.


<<< StaticLocationObject FunctionsOpenStatus >>>