Difference between revisions of "Script.plist"
m (→Conditions: tidier) |
m (→Conditions: how multiple conditions work) |
||
Line 3: | Line 3: | ||
== Conditions == | == Conditions == | ||
Check whether the current status of one of a number of [[Methods#Querying_states|queriable states]] and [[mission_variable]]s are '''equal''', '''lessthan''', '''greaterthan''' a given value or state, or '''oneof''' a list of space separated states. | Check whether the current status of one of a number of [[Methods#Querying_states|queriable states]] and [[mission_variable]]s are '''equal''', '''lessthan''', '''greaterthan''' a given value or state, or '''oneof''' a list of space separated states. | ||
+ | |||
+ | Multiple conditions may be specified, a logical 'AND' is applied to determine whether the conditions are met or not. | ||
example: | example: |
Revision as of 17:59, 22 January 2006
script.plist Used by missions and OXP's to check conditions and change scripted parameters accordingly. In OXP's it provides Oolite with additional information to generate and populate customised systems. Every condition is followed by a scripted action, a 'Do' or 'Else' entry, a 'do' entry can be nested (have conditions, followed by Do)
Conditions
Check whether the current status of one of a number of queriable states and mission_variables are equal, lessthan, greaterthan a given value or state, or oneof a list of space separated states.
Multiple conditions may be specified, a logical 'AND' is applied to determine whether the conditions are met or not.
example:
<key>conditions</key> <dict> <array> <string>shipsFound_number equal 0</string> </array> </dict>
Do
The actions (methods) to perform when conditions are met.
Example:
<key>do</key> <dict> <array> <string>addShips: asp-cloaked 1</string> <string>addShips: pirate 12</string> </array> </dict>
Else
Actions performed when conditions are not met. Same as "Do".
- This article is a stub. You can help EliteWiki by expanding it.