In-sequence

From FreeSpace Wiki
Jump to: navigation, search
In-Sequence (Conditional operator)
	Supplies arguments for the <argument> special data item.  The first argument in the list will be selected to satisfy the expression(s) in which <argument> is used. The same argument will be returned by all subsequent calls

Takes 1 or more arguments...
	All:	Anything that could be used in place of <argument>.

Example

One of the possible uses of this SEXP is to gradually beam-free a warship, like this:

$Formula: ( when-argument 
   ( in-sequence "turret20" "turret22" ) 
   ( true ) 
   ( beam-free "Phoenicia" "<argument>" ) 
   ( invalidate-argument "<argument>" ) 
)
+Name: Phoenicia beams
+Repeat Count: -1
+Trigger Count: 2
+Interval: 5

(where Phoenicia is a GTD Hecate and the turrets above are her upper and lower forward main beam cannons, respectively.)