Difference between revisions of "Selection only (property type)"
m (moved Selection only property type to Selection only (property type): clarify title) |
(Using with functions) |
||
Line 69: | Line 69: | ||
* If you only want this property to appear on the property tab if the item has a particular characteristic, then select the name of a particular property and the value it must have before this property is shown. | * If you only want this property to appear on the property tab if the item has a particular characteristic, then select the name of a particular property and the value it must have before this property is shown. | ||
+ | == Using with functions == | ||
+ | Selection only properties can be read using [[Boolean functions]]. | ||
+ | |||
+ | An <Unselected> property will return the value 0. | ||
+ | |||
+ | A <Selected> property will return the value 1. | ||
+ | |||
+ | [[Group Functions]] can be used to filter a group so that only those with the property selected will be returned. | ||
+ | |||
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[Object_property_type|<<< Object property type]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Properties]]</TD><TD ALIGN=CENTER>[[State_property_type|State property type >>>]]</TD></TABLE> | <TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[Object_property_type|<<< Object property type]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Properties]]</TD><TD ALIGN=CENTER>[[State_property_type|State property type >>>]]</TD></TABLE> |
Revision as of 09:12, 13 September 2013
THE MAIN ITEMS | |
---|---|
Locations | |
Objects | |
Tasks | |
Characters | |
Events | |
Variables | |
Groups | |
Properties | |
---- Character | |
---- Integer | |
---- Location Group | |
---- Location | |
---- Object | |
---- Selection | |
---- State | |
---- Value | |
---- Text | |
Text Overrides | |
Hints | |
Synonyms | |
User functions |
A "Selection Only" property is a simple boolean property, it is either selected (has a tick in the box) or not.
The majority of properties are selection only, here is the "Known" property of a character which has been selected:
Testing the Property
To test if a particular property is selected, just use the "have property" restriction on the Object, Character or Location page of the restriction editor.
In the following example we are testing if the player character has a property called "Clothing on head" selected.
Creating a new selection-only property
Create a new property by clicking the "Add new property" button at the bottom of the Properties tab of a Character, Location, or Object. You can also right-click the open "Properties" folder and select "Add Property", or right-click any other open folder and select "Add new/Property".
- Give the new property a description.
- Ensure that "property of" is correctly set (Characters, Objects or Locations)
- Set the property "Type" to "Selection only"
- The "Mandatory" box never needs to be selected for this type of property.
- If you only want this property to appear on the property tab if the item has a particular characteristic, then select the name of a particular property and the value it must have before this property is shown.
Using with functions
Selection only properties can be read using Boolean functions.
An <Unselected> property will return the value 0.
A <Selected> property will return the value 1.
Group Functions can be used to filter a group so that only those with the property selected will be returned.
<<< Object property type | Properties | State property type >>> |