So I'm creating a system to make the enemy boss in my map cast abilities. Boss take damage, he casts abilities if certain conditions are met. I'm using timers to act as like cooldowns. It works for the most part, except it appear that one of my timers isn't being set at all!
Here's my code:
Here's my code:
-
Arthas Cast
-
Events
- Game - GDD_Event becomes Equal to 0.00
-
Conditions
- GDD_DamagedUnit Equal to Boss
- (Remaining time for BossAbilityTimerBuffer) Equal to 0.00
-
Actions
- -------- --------------- --------
- -------- Boss Ultimate --------
- -------- --------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Life of Boss) Less than or equal to 2000.00
- BossUltimateUsed Equal to False
-
Then - Actions
- Trigger - Run Arthas Ultimate <gen> (ignoring conditions)
- Countdown Timer - Start BossAbilityTimerBuffer as a One-shot timer that will expire in 9.00 seconds
- Set BossUltimateUsed = True
- Else - Actions
-
If - Conditions
- -------- Rechecks AbilityBuffer in case Ultimate was triggered --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Remaining time for BossAbilityTimerBuffer) Equal to 0.00
-
Then - Actions
- -------- --------------- --------
- -------- Holy Light --------
- -------- --------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Remaining time for BossAbilityTimer[1]) Equal to 0.00
- BossAbilityCounter Equal to 1
-
Then - Actions
- Game - Display to (All players) for 1.00 seconds the text: Holy Light
- Unit - Add Holy Light (boss) to Boss
- Unit - Order Boss to Human Paladin - Holy Light Boss
- Set BossAbilityCounter = (BossAbilityCounter + 1)
- Countdown Timer - Start BossAbilityTimer[1] as a One-shot timer that will expire in 30.00 seconds
- Countdown Timer - Start BossAbilityTimerBuffer as a One-shot timer that will expire in 3.00 seconds
- Wait 3.00 seconds
- Unit - Remove Holy Light (boss) from Boss
-
Else - Actions
- -------- --------------- --------
- -------- Divine Shield --------
- -------- --------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Remaining time for BossAbilityTimer[2]) Equal to 0.00
- BossAbilityCounter Equal to 2
-
Then - Actions
- Game - Display to (All players) for 1.00 seconds the text: Divine Shield
- Unit - Add Divine Shield (boss) to Boss
- Unit - Order Boss to Human Paladin - Activate Divine Shield
- Set TempPoint = (Position of Boss)
- Unit - Create 1 Dummy Unit for Neutral Hostile at TempPoint facing Default building facing degrees
- Unit - Order (Last created unit) to Human Sorceress - Slow Boss
- Custom script: call RemoveLocation (udg_TempPoint)
- Set BossAbilityCounter = 1
- Countdown Timer - Start BossAbilityTimer[2] as a One-shot timer that will expire in 25.00 seconds
- Countdown Timer - Start BossAbilityTimerBuffer as a One-shot timer that will expire in 3.00 seconds
- Wait 6.00 seconds
- Unit - Remove Divine Shield (boss) from Boss
- Else - Actions
-
If - Conditions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Events
-
Timer Test
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
- Game - Display to (All players) for 1.00 seconds the text: (BossTimer1: + (String((Remaining time for BossAbilityTimer[1]))))
- Game - Display to (All players) for 1.00 seconds the text: (BossTimer2: + (String((Remaining time for BossAbilityTimer[2]))))
- Game - Display to (All players) for 1.00 seconds the text: (Buffer: + (String((Remaining time for BossAbilityTimerBuffer))))
-
Events