Difference between revisions of "Directive-value"
From FreeSpace Wiki
(new + notes + example) |
m (→Notes: typo) |
||
Line 10: | Line 10: | ||
*Found in Status --> Mission and must be a subordinate to "and". (see example) | *Found in Status --> Mission and must be a subordinate to "and". (see example) | ||
*If set to 0, no number will appear | *If set to 0, no number will appear | ||
− | *A [[Variables|variable]] is typically paired with this SEXP. In this case, the value does not require a trigger/repeat count | + | *A [[Variables|variable]] is typically paired with this SEXP. In this case, the value does not require a trigger/repeat count—the event that does the counting, on the other hand, does. |
==Example== | ==Example== |
Revision as of 08:26, 24 March 2021
directive-value Causes a value to appear in the directive count Always returns true. Takes 1 or more arguments... 1: Value 2: (Optional) Ignore the directive count set by any earlier SEXPs in the event. If set to false it will add instead
Notes
- An earlier version was called: directive-is-variable
- Found in Status --> Mission and must be a subordinate to "and". (see example)
- If set to 0, no number will appear
- A variable is typically paired with this SEXP. In this case, the value does not require a trigger/repeat count—the event that does the counting, on the other hand, does.
Example
$Formula: ( when-argument ( every-of "Newton" "Novalis" "Restoration" "Lytcha" ) ( and ( is-disabled-delay 1 "<argument>" ) ( directive-value @faustus-disable-num[4] ) ) ( do-nothing ) ) +Name: Disable dir +Repeat Count: 1 +Interval: 1 +Objective: XSTR("Disable Science Vessels", -1)
$Formula: ( when-argument ( any-of "Newton" "Novalis" "Restoration" "Lytcha" ) ( is-disabled-delay 0 "<argument>" ) ( modify-variable @faustus-disable-num[4] ( - @faustus-disable-num[4] 1 ) ) ( protect-ship "<argument>" ) ( ship-invulnerable "<argument>" ) ( add-remove-escort "<argument>" 0 ) ( invalidate-argument "<argument>" ) ) +Name: faustus-disable-num +Repeat Count: -1 +Trigger Count: 4 +Interval: 1