Creating A Reverse Timer
It's perfectly possible with the editing triggers found in StarEdit (aka StarCraft campaign editor for those . . . umm . . . sc vocabulary inept =). You need to make sure that for every second that passes, 2 seconds go up on the timer. But it's not as easy as that. Triggers only run every two seconds when preserved so if you created a countdown timer and made a trigger like this:
PLAYER(S):
All Players
CONDITION(S):
ALWAYS
Always
ACTION(S):
SET COUNTDOWN TIMER
Modify Countdown Timer: "Add" 2 seconds
PRESERVE TRIGGER
Preserve Trigger
Technically, it would show the correct time in the end, but only every two seconds =) Thus, into switches (if you don't know what switches are yet, make sure you look at my F.A.Q on switches found here).
Here's what you do, *inhales deeply*, create a trigger like this adding one second for every two seconds:
PLAYER(S):
All Players
CONDITION(S):
SWITCH
"Switch 1" is set
ACTION(S):
SET COUNTDOWN TIMER
Modify Countdown Timer: "Add" "1" seconds
PRESERVE TRIGGER
Preserve Trigger
Create a similar trigger like the last, for a player without any wait commands, except you must change the conditions to Switch 2 like so:
PLAYER(S):
All Players
CONDITION(S):
SWITCH
"Switch 2" is set
ACTION(S):
SET COUNTDOWN TIMER
Modify Countdown Timer: "Add" "1" seconds
PRESERVE TRIGGER
Preserve Trigger
Create a final trigger so that it sets both switches at certain times:
PLAYER(S):
All Players
CONDITION(S):
ALWAYS *
Always
ACTION(S):
SET SWITCH
Set "Switch 1"
WAIT
Wait for "1000" milliseconds
SET SWITCH
Set "Switch 2"
* : Replace ALWAYS with condition(s) that begins the reverse timer.
Once you create these triggers properly, it should work fine, just make sure that once your countdown timer reaches the desired limit, you 'Clear' switches "First" and "Second". Let's say I want to turn the reverse counter off at 50 seconds, I would use the following trigger:
PLAYER(S):
All Players
CONDITION(S):
COUNTDOWN TIMER
Countdown timer is "50" game seconds
ACTION(S):
SET SWITCH
Clear "Switch 1"
SET SWITCH
Clear "Switch 2"
SET COUNTDOWN TIMER
Modify Countdown Timer: "Set to" "0" seconds
This is good to be used for maps in which you want to see playing time, it is also an invaluable tool to show off your skills (although many may think it as easy as, plus 2 seconds, preserve trigger =) replacing a normal countdown timer
|
|
|
| |