Difference between revisions of "Every-time"
From FreeSpace Wiki
(comment added) |
m (category) |
||
Line 10: | Line 10: | ||
===Comments=== | ===Comments=== | ||
<tt>Every-time</tt> and [[every-time-argument]] should be used extremely rarely, if ever, and only with careful and cautious planning. Since these sexps will execute in every single frame, they add a measurably larger performance overhead than a regular [[when]] or [[when-argument]] sexp. Worse, since framerate can vary greatly between computers and even between playthroughs, improper use of these sexps can lead to wildly unpredictable (and even incorrect) results, as was famously demonstrated in the first few versions of [[The Procyon Insurgency]]. As described in the help texts, these sexps should ''only'' be used for volatile conditions that may become true more than once. | <tt>Every-time</tt> and [[every-time-argument]] should be used extremely rarely, if ever, and only with careful and cautious planning. Since these sexps will execute in every single frame, they add a measurably larger performance overhead than a regular [[when]] or [[when-argument]] sexp. Worse, since framerate can vary greatly between computers and even between playthroughs, improper use of these sexps can lead to wildly unpredictable (and even incorrect) results, as was famously demonstrated in the first few versions of [[The Procyon Insurgency]]. As described in the help texts, these sexps should ''only'' be used for volatile conditions that may become true more than once. | ||
+ | |||
+ | [[Category:SCP SEXPs]] |
Revision as of 12:32, 8 August 2007
every-time Every-time (Conditional operator) This is a version of "when" that will always evaluate its arguments. It's useful in situations where you need to repeatedly check things that may become true more than once. Since this sexp will execute every time it's evaluated, you may need to use it as an argument to "when" if you want to impose restrictions on how it's called. Takes 2 or more arguments... 1: Boolean expression that must be true for actions to take place. Rest: Actions to take when boolean expression is true.
Comments
Every-time and every-time-argument should be used extremely rarely, if ever, and only with careful and cautious planning. Since these sexps will execute in every single frame, they add a measurably larger performance overhead than a regular when or when-argument sexp. Worse, since framerate can vary greatly between computers and even between playthroughs, improper use of these sexps can lead to wildly unpredictable (and even incorrect) results, as was famously demonstrated in the first few versions of The Procyon Insurgency. As described in the help texts, these sexps should only be used for volatile conditions that may become true more than once.