Hello everyone here at Hive! I'm here looking for help about my triggers, that aren't despawning one kind of my dummies. Let me explain better:
I have three kinds of dummies inside my project: One that does nothing (for abilites, auras, etc), one with attack set to 1 (for orb effects), and one for visual effect (that appear casting abilities for heroes, but only for aesthetic purposes, like a serpent ward channeling Big Bad Voodoo).
I have an Arena System made by Uncle here at Hive (Didn't mark him, because I don't know if we can, but thank you very much Uncle), where units gets removed, winning or losing a wave of enemies.
And this trigger, is when a dummy is summoned, for arena events, feature used on my boss fights:
What is exactly my problem? When this dummy has an aura effect, like this one above, he doesn't get removed if players lose the wave, but if they win, he gets removed normally. The same dummy, on other boss fights, that receive other abilities instead of an aura (One has permanent immolation, for example), gets removed normally, winning or losing a wave. The issue is, when players repeat the boss wave, the arena event is already happening, and it is harmful for players, or beneficial to the boss and his minions.
So, what is going on, that I'm not seeing? Maybe trigger is too big? The order of things happening is not right? I really don't see what is wrong, since both winning and losing waves have the same logic (In my view), and the dummy used is always the same. I'll leave the map here if you want to see the entire system by yourself.
I thank you in advance.
I have three kinds of dummies inside my project: One that does nothing (for abilites, auras, etc), one with attack set to 1 (for orb effects), and one for visual effect (that appear casting abilities for heroes, but only for aesthetic purposes, like a serpent ward channeling Big Bad Voodoo).
I have an Arena System made by Uncle here at Hive (Didn't mark him, because I don't know if we can, but thank you very much Uncle), where units gets removed, winning or losing a wave of enemies.
-
Arena Players Win Wave
-
Events
-
Conditions
-
Actions
-
-------- --------
-
Set VariableSet Waves_Beated = (Waves_Beated + 1)
-
Trigger - Run Relics Check <gen> (checking conditions)
-
Item - Pick every item in Dropped Items Arena <gen> and do (Item - Move (Picked item) to (Random point in Item Stash Arena <gen>))
-
Item - Pick every item in Dropped Artifacts Arena <gen> and do (Item - Move (Picked item) to (Random point in Relics and Artifacts <gen>))
-
-------- --------
-
Game - Display to (All players) the text: <Empty String>
-
Game - Display to (All players) for 10.00 seconds the text: (You've completed |cff00ff00Wave + ((String(Arena_Current_Wave)) + |r!))
-
-------- --------
-
Unit Group - Pick every unit in Croud and do (Actions)
-
Loop - Actions
-
Animation - Play (Picked unit)'s stand, victory animation
-
-
-
Animation - Play Uncle Goblin, the Relicary 0012 <gen>'s stand fourth animation
-
-------- --------
-
Wait 1.00 game-time seconds
-
-------- --------
-
-------- Reward gold: --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Arena_Win_Reward Greater than 0.00
-
-
Then - Actions
-
Game - Display to (All players) the text: (Reward: + (|cffffff00+ + ((String(Bounty_Win_Reward_Gold)) + Gold|r.)))
-
Sound - Play Reward <gen>
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Player - Add (Integer(Arena_Win_Reward)) to (Picked player).Current gold
-
-
-
-
Else - Actions
-
-
-------- --------
-
-------- Move/revive heroes back at the tavern: --------
-
Unit Group - Pick every unit in Player_Hero_Group and do (Actions)
-
Loop - Actions
-
Camera - Pan camera for (Owner of (Picked unit)) to Hero_Spawn_Point over 0.00 seconds
-
Unit - Move (Picked unit) instantly to Hero_Spawn_Point
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
Hero - Instantly revive (Picked unit) at Hero_Spawn_Point, Show revival graphics
-
-
-
-------- --------
-
-------- Remove leftover units in the arena: --------
-
Unit Group - Pick every unit in (Units of type Dummy Arena Effect) and do (Unit - Remove (Picked unit) from the game)
-
Unit Group - Pick every unit in (Units in Arena 1 <gen>) and do (Actions)
-
Loop - Actions
-
If (((Picked unit) has buff Credits ) Equal to False) then do (Unit - Remove (Picked unit) from the game) else do (Do nothing)
-
-
-
Custom script: set bj_wantDestroyGroup = true
-
Destructible - Pick every destructible in (Playable map area) and do (If ((Destructible-type of (Picked destructible)) Equal to Barrel of Explosives) then do (Destructible - Kill (Picked destructible)) else do (Do nothing))
-
-------- --------
-
-------- End Any Boss Fight Trigger --------
-
For each (Integer A) from 1 to 3, do (Actions)
-
Loop - Actions
-
Environment - Remove Boss_Weather_Effect[(Integer A)]
-
-
-
Player Group - Pick every player in (All players) and do (Camera - Stop swaying/shaking the camera for (Picked player).)
-
For each (Integer A) from 1 to 4, do (Actions)
-
Loop - Actions
-
-------- --------
-
-------- Starter Triggers --------
-
Trigger - Turn on Boss_Event_Start[(Integer A)]
-
Trigger - Turn on Last_Wave_Boss_Event_Start_A[(Integer A)]
-
Trigger - Turn on Last_Wave_Boss_Event_Start_B[(Integer A)]
-
Trigger - Turn on Last_Wave_Boss_Event_Start_C[(Integer A)]
-
-------- --------
-
-------- Loop Triggers --------
-
Trigger - Turn off Boss_Event_Loop[(Integer A)]
-
Trigger - Turn off Last_Wave_Boss_Event_Loop_A[(Integer A)]
-
Trigger - Turn off Last_Wave_Boss_Event_Loop_B[(Integer A)]
-
Trigger - Turn off Last_Wave_Boss_Event_Loop_C[(Integer A)]
-
-
-
-------- --------
-
-------- Check if the players have finished the final wave! --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Arena_Current_Wave Equal to 22
-
-
Then - Actions
-
Trigger - Run Game Over Victory <gen> (ignoring conditions)
-
Skip remaining actions
-
-
Else - Actions
-
-
-------- --------
-
-------- Hide Timer Wave Limit --------
-
Countdown Timer - Pause (Last started timer)
-
Countdown Timer - Hide (Last created timer window)
-
-------- --------
-
-------- Checking Time Limit for Creeps or Boss Waves --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Arena_Current_Wave Equal to 7
-
-
Then - Actions
-
Set VariableSet Arena_Wave_Time_Limit = 300.00
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Arena_Current_Wave Equal to 8
-
-
Then - Actions
-
Set VariableSet Arena_Wave_Time_Limit = 150.00
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Arena_Current_Wave Equal to 14
-
-
Then - Actions
-
Set VariableSet Arena_Wave_Time_Limit = 300.00
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Arena_Current_Wave Equal to 15
-
-
Then - Actions
-
Set VariableSet Arena_Wave_Time_Limit = 150.00
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Arena_Current_Wave Equal to 21
-
-
Then - Actions
-
Set VariableSet Arena_Wave_Time_Limit = 300.00
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
-
-
-
-
-
-
-------- --------
-
-------- Prepare the next wave: --------
-
If (Arena_Current_Wave Equal to 21) then do (Set VariableSet Arena_Time_Between_Waves = 120.00) else do (Do nothing)
-
Countdown Timer - Start Timer_Wave as a One-shot timer that will expire in Arena_Time_Between_Waves seconds
-
Countdown Timer - Create a timer window for (Last started timer) with title Next wave in:
-
Set VariableSet Timer_Window = (Last created timer window)
-
Countdown Timer - Show Timer_Window
-
-
-
Arena Players Lose Wave
-
Events
-
Conditions
-
Actions
-
Set VariableSet Player_Lives = (Player_Lives - 1)
-
Item - Pick every item in Dropped Items Arena <gen> and do (Item - Move (Picked item) to (Random point in Item Stash Arena <gen>))
-
Item - Pick every item in Dropped Artifacts Arena <gen> and do (Item - Move (Picked item) to (Random point in Relics and Artifacts <gen>))
-
-------- --------
-
Game - Display to (All players) for 1.00 seconds the text: <Empty String>
-
Game - Display to (All players) for 10.00 seconds the text: (You've failed |cffff0000Wave + ((String(Arena_Current_Wave)) + (|r + (- Player lives remaining: |cff00ff00 + ((String(Player_Lives)) + |r)))))
-
-------- --------
-
Animation - Play Uncle Goblin, the Relicary 0012 <gen>'s stand third animation
-
Unit Group - Pick every unit in Croud and do (Actions)
-
Loop - Actions
-
Animation - Play (Picked unit)'s death animation
-
-
-
-------- --------
-
-------- Reward some gold for trying: --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Arena_Lose_Reward Greater than 0.00
-
-
Then - Actions
-
Game - Display to (All players) the text: <Empty String>
-
Game - Display to (All players) the text: (Consolation Prize: + (|cffffff00+ + ((String(Bounty_Lose_Reward)) + Gold|r.)))
-
Sound - Play Reward <gen>
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Player - Add (Integer(Arena_Lose_Reward)) to (Picked player).Current gold
-
-
-
-
Else - Actions
-
-
-------- --------
-
-------- Check if the players have run out of lives! --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_Lives Less than 0
-
-
Then - Actions
-
Trigger - Run Game Over Defeat <gen> (ignoring conditions)
-
Skip remaining actions
-
-
Else - Actions
-
-
-------- --------
-
Wait 1.00 game-time seconds
-
-------- --------
-
-------- Move/revive heroes back at the tavern: --------
-
Unit Group - Pick every unit in Player_Hero_Group and do (Actions)
-
Loop - Actions
-
Camera - Pan camera for (Owner of (Picked unit)) to Hero_Spawn_Point over 0.00 seconds
-
Unit - Move (Picked unit) instantly to Hero_Spawn_Point
-
Hero - Instantly revive (Picked unit) at Hero_Spawn_Point, Show revival graphics
-
-
-
-------- --------
-
-------- Remove leftover units in the arena: --------
-
Unit Group - Pick every unit in (Units in Arena 1 <gen>) and do (Actions)
-
Loop - Actions
-
If (((Picked unit) has buff Credits ) Equal to False) then do (Unit - Remove (Picked unit) from the game) else do (Do nothing)
-
-
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in Creep Spawn East <gen>) and do (Actions)
-
Loop - Actions
-
If (((Picked unit) has buff Credits ) Equal to False) then do (Unit - Remove (Picked unit) from the game) else do (Do nothing)
-
-
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in Creep Spawn North <gen>) and do (Actions)
-
Loop - Actions
-
If (((Picked unit) has buff Credits ) Equal to False) then do (Unit - Remove (Picked unit) from the game) else do (Do nothing)
-
-
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in Creep Spawn South <gen>) and do (Actions)
-
Loop - Actions
-
If (((Picked unit) has buff Credits ) Equal to False) then do (Unit - Remove (Picked unit) from the game) else do (Do nothing)
-
-
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in Creep Spawn West <gen>) and do (Actions)
-
Loop - Actions
-
If (((Picked unit) has buff Credits ) Equal to False) then do (Unit - Remove (Picked unit) from the game) else do (Do nothing)
-
-
-
Custom script: set bj_wantDestroyGroup = true
-
Destructible - Pick every destructible in (Playable map area) and do (If ((Destructible-type of (Picked destructible)) Equal to Barrel of Explosives) then do (Destructible - Kill (Picked destructible)) else do (Do nothing))
-
Set VariableSet Arena_Enemy_Alive = 0
-
-------- --------
-
-------- End Any Boss Fight Trigger --------
-
Unit Group - Pick every unit in (Units of type Dummy Arena Effect) and do (Unit - Remove (Picked unit) from the game)
-
For each (Integer A) from 1 to 3, do (Actions)
-
Loop - Actions
-
Environment - Remove Boss_Weather_Effect[(Integer A)]
-
-
-
Player Group - Pick every player in (All players) and do (Camera - Stop swaying/shaking the camera for (Picked player).)
-
For each (Integer A) from 1 to 4, do (Actions)
-
Loop - Actions
-
-------- --------
-
-------- Starter Triggers --------
-
Trigger - Turn on Boss_Event_Start[(Integer A)]
-
Trigger - Turn on Last_Wave_Boss_Event_Start_A[(Integer A)]
-
Trigger - Turn on Last_Wave_Boss_Event_Start_B[(Integer A)]
-
Trigger - Turn on Last_Wave_Boss_Event_Start_C[(Integer A)]
-
-------- --------
-
-------- Loop Triggers --------
-
Trigger - Turn off Boss_Event_Loop[(Integer A)]
-
Trigger - Turn off Last_Wave_Boss_Event_Loop_A[(Integer A)]
-
Trigger - Turn off Last_Wave_Boss_Event_Loop_B[(Integer A)]
-
Trigger - Turn off Last_Wave_Boss_Event_Loop_C[(Integer A)]
-
-
-
-------- Hide Timer Wave Limit --------
-
Countdown Timer - Pause (Last started timer)
-
Countdown Timer - Hide (Last created timer window)
-
-------- --------
-
-------- Repeat the last wave: --------
-
Set VariableSet Arena_Current_Wave = (Arena_Current_Wave - 1)
-
Countdown Timer - Start Timer_Wave as a One-shot timer that will expire in Arena_Time_Between_Waves seconds
-
Countdown Timer - Create a timer window for Timer_Wave with title Next wave in:
-
Set VariableSet Timer_Window = (Last created timer window)
-
Countdown Timer - Show Timer_Window
-
-
And this trigger, is when a dummy is summoned, for arena events, feature used on my boss fights:
-
Petrified Second Phase
-
Events
-
Unit - A unit owned by Player 9 (Gray) Takes damage
-
-
Conditions
-
(Damage Target) Equal to Unique_Boss[1]
-
(Unit-type of (Damage Target)) Equal to Petrified Hero - |cffff8080Outerworld|r (Unique - Tier 1)
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer((Percentage life of Unique_Boss[1]))) Less than or equal to Boss_Health[2]
-
-
Then - Actions
-
Unit - Remove All buffs from Unique_Boss[1]
-
Special Effect - Create a special effect attached to the overhead of Unique_Boss[1] using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Game - Display to (All players) the text: <Empty String>
-
Game - Display to (All players) the text: |cffff0000Petrified...
-
Sound - Play Boss_Warcry[2] at 100.00% volume, attached to Unique_Boss[1]
-
Player Group - Pick every player in (All players) and do (Camera - Shake the camera for (Picked player) with magnitude 1.25)
-
Unit - Create 1 Dummy Arena Effect for (Random player from Group_Enemies) at Arena_Center facing Default building facing degrees
-
Unit - Add Earthquake (Arena Event) to (Last created unit)
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
Do nothing
-
-
-
-
What is exactly my problem? When this dummy has an aura effect, like this one above, he doesn't get removed if players lose the wave, but if they win, he gets removed normally. The same dummy, on other boss fights, that receive other abilities instead of an aura (One has permanent immolation, for example), gets removed normally, winning or losing a wave. The issue is, when players repeat the boss wave, the arena event is already happening, and it is harmful for players, or beneficial to the boss and his minions.
So, what is going on, that I'm not seeing? Maybe trigger is too big? The order of things happening is not right? I really don't see what is wrong, since both winning and losing waves have the same logic (In my view), and the dummy used is always the same. I'll leave the map here if you want to see the entire system by yourself.
I thank you in advance.