This is how I would do it, where X = the player, Z
1 = a unit player 1 won't ever use, Z
2 = a second unit player 1 won't ever use, and timer is a switch. This setup assumes that some initialization trigger set the deaths for Z
1 to 0 and Z
2 to 30( or 720 if using hyper triggers). For the other player just copy/paste these and change the value of X and the location.
Related Knowledge:
Death Counters Hyper TriggersTrigger 1a:
[Cond] If switch "timer" is set
[Cond] Player X brings at most 5 Protoss High Templar to "Temple Location"
[Cond] Player X brings at least 18 [men] to "Temple Location"
[Act] Modify death counts for Player X: Add 1 for unit Z1
[Act] Preserve Trigger
Trigger 1b:
[Cond] If switch "timer" is set
[Cond] Player X brings at most 17 [men] to "Temple Location"
[Cond] Player X brings at least 6 Protoss High Templar to "Temple Location"
[Act] Modify death counts for Player X: Add 1 for unit Z1
[Act] Preserve Trigger
Trigger 1c:
[Cond] If switch "timer" is set
[Cond] Player X brings at most 5 Protoss High Templar to "Temple Location"
[Cond] Player X brings at most 17 [men] to "Temple Location"
[Act] Modify death counts for Player X: Add 1 for unit Z1
[Act] Preserve Trigger
If the switch is set then it means that previously there were 6 templar at the temple, but this trigger also detects that there now isn't the required amount. So it adds 1 to the deaths of Z
1, which for future reference will hold the value of the 30 second countdown.
EDIT: Just realized you also check to make sure that 6 templars AND 18 units are at the temple location, <s>so you'd have to split this trigger for each one and make sure they both don't run in the same cycle</s> 3 triggers instead of one.
Trigger 2:
[Cond] If switch "timer" is set
[Cond] If Player X has at least 30 deaths of unit Z1
[Act] Modify death counts for Player X: Set to 0 for unit Z1
[Act] Modify death counts for Player X: Set to 60 for unit Z2
[Act] Clear switch "timer"
[Act] Any other stuff you want to happen
[Act] Preserve Trigger
The conditions check if 30 seconds have passed. Note, you need to change the 30 to 15 if your not using hypertriggers or 360 if you are, the 60 will also be either 30 or 720 respectively. If the 30 seconds have passed then it will set the death counters back to their defaults.
Trigger 3:
[Cond] Player X brings at least 6 Protoss High Templar to "Temple Location"
[Cond] Player X brings at least 18 [men] to "Temple Location"
[Act] Set switch "timer"
[Act] Modify death counts for Player X: Subtract 1 for unit Z2
[Act] Preserve Trigger
If they bring the required number of templar to your location then set a switch to remember that the timer has been started. Additionally, while the required number of templar continue to live this will decrease the value of Z
2, which is the death counter holding the 60 second countdown value.
Trigger 4:
[Cond] Player X has suffered at most 0 deaths of unit Z2
[Act] Victory trigger stuff goes here
Self explanatory, 0 deaths of Z
2 means that 60 seconds passed with 6 templar at the temple location.
With this setup you could also do a trigger checking for each value of Z
2 and displaying a countdown timer at that time to inform players of the current position. IE:
Trigger 1:
[Cond] Player X has suffered at most 720 deaths of unit Z2
[Act] Modify Countdown Timer: Set to 60 seconds
[Act] Preserve Trigger
Trigger 2:
[Cond] Player X has suffered at most 708 deaths of unit Z2
[Act] Modify Countdown Timer: Set to 59 seconds
[Act] Preserve Trigger
This assumes your using hyper triggers, if your not then the value of the deaths will be different for the example.
EDIT: Welcome to SEN btw.
Post has been edited 3 time(s), last time on Dec 11 2008, 1:30 am by Elvang.
None.