Directive-value

From FreeSpace Wiki
Revision as of 08:25, 24 March 2021 by TopAce (talk | contribs) (new + notes + example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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@mdash;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