User Guide
65
TIMERS
Countdown timers monitor the passage of time in the game. Timers come in two varieties: Seconds timers
and Frame timers. Both timers assume that in the game one second equals 30 frames. On faster machines,
the game can perform at this rate. On a machine that is producing 18 frames/second, the rate for timers is
still assumed to be 30 frames/second. So, on a slower machine, while 30 frames may last nearly two seconds
in real time, they are treated as a single second in game time.
✯
Avoid using timers in multiplayer missions.
❍
To create a Seconds timer, use the action [Scripting] Seconds countdown timer - set. Enter a name for
the timer and its initial value in seconds. The timer begins as soon as the script is executed.
❍
To create a Frame timer, use the action [Scripting] Frame countdown timer - set. Enter a name for the
timer and its initial value in frames. The timer begins to count down frames as soon as the script is
executed.
✯
The [Scripting] Frame countdown timer – random action lets you set up frame timers of random
duration, which is useful for creating the appearance of random behavior in your maps.
Timers always count down from the start time that you set. A timer can be used as a counter, too. You can
perform all of the operations on a timer that you can perform on a counter.
USEFUL CONDITIONS
When scripting timers, there are some useful conditions that you can test to determine if action should be
taken:
✯
Timer Expired: You can fire actions when a timer has reached 0 seconds or frames. The Timer Expired
condition is useful for scripted cinematics or for delaying action. For pacing purposes, you may want to
use timers to delay counter-attacks from the AI.
✯
Counter Compared to Value: Use this condition to compare a named timer to an entered value. Note
that the default setting is “less than zero.” If you don’t set a positive value for the counter, the condition
never fires.
CONDITIONALS
When you have multiple conditions to test in a script, you can compare them with AND or OR conditionals.
✯
The NOT conditional is not available.
AND
If a script contains two conditions, Condition 1 AND Condition 2 must be TRUE for the Action if True to be
executed.
Whenever a new condition is added to a script, the conditional AND is automatically applied. Unless
otherwise defined, in any list of scripted conditions, the conditions must all be TRUE for the action to fire.
✯
The AND conditional always has precedence over OR. In a list of scripted conditions, all of the
conditions joined by the default AND conditional are tested before any of the OR conditions.
OR
If a script contains two conditions connected by an OR conditional, Condition 1 OR Condition 2 must be
TRUE for the Action if True to be executed.
❍
To change a conditional to an OR condition, click OR. Use the MOVE UP and MOVE DOWN buttons to
reposition the OR condition. The conditions before the OR are compared to the conditions after it.
❍
To remove an OR conditional, click the Or line in the list of conditionals, and then click DELETE.
NOTE: When you delete an OR conditional, all of the conditions below the OR are deleted as
well. If you are going to use OR conditionals, be sure to check the logic of them before you
build the scripts.










