Hello once more, Hivers. Now, I come asking for some help to detect what I'm doing wrong. It's been a while since this problem occurs, and I always try to fix the problem, but I still didn't find what is missing or missplaced.
When someone leaves the game DURING the fight inside the arena, sometimes the trigger counts the leaving hero, and sometimes, doesn't count. With this, when all players die inside the arena, the game never ends, since the leaving player "life" is still counting.
I have this trigger, that is supposed to fire when a player leaves, sharing his resources to the remaining players, removing his units from the game, closing share options, that sort of thing:
This is the "Arena Unit Dies" trigger that fires:
And this one is the Handicap System:
What am I letting pass, that is causing this trouble? I couldn't find, and I already tried some weeks before coming here and asking for help.
Thanks in advance.
When someone leaves the game DURING the fight inside the arena, sometimes the trigger counts the leaving hero, and sometimes, doesn't count. With this, when all players die inside the arena, the game never ends, since the leaving player "life" is still counting.
I have this trigger, that is supposed to fire when a player leaves, sharing his resources to the remaining players, removing his units from the game, closing share options, that sort of thing:
-
Leaver Trigger
-
Events
-
Player - Player 1 (Red) leaves the game
-
Player - Player 2 (Blue) leaves the game
-
Player - Player 3 (Teal) leaves the game
-
Player - Player 4 (Purple) leaves the game
-
Player - Player 5 (Yellow) leaves the game
-
Player - Player 6 (Orange) leaves the game
-
-
Conditions
-
Actions
-
Player Group - Remove (Triggering player) from Active_Players.
-
Set VariableSet Player_Currency[1] = (((Triggering player) Current gold) / (Number of players in (All players controlled by a User player)))
-
Set VariableSet Player_Currency[2] = (((Triggering player) Current lumber) / (Number of players in (All players controlled by a User player)))
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
Game - Display to (Player group((Player((Integer A))))) the text: <Empty String>
-
Game - Display to (Player group((Player((Integer A))))) the text: (Player_Colors[(Player number of (Triggering player))] + has left the arena. What a coward!)
-
Game - Display to (Player group((Player((Integer A))))) the text: (The leaver + ( left |cffffff00 + ((String(Player_Currency[1])) + ( gold|r and |cff00ff00 + ((String(Player_Currency[2])) + souls|r for you.)))))
-
-
-
Unit Group - Pick every unit in (Units owned by (Triggering player).) and do (Actions)
-
Loop - Actions
-
Hero - Drop the item from slot 1 of (Picked unit).
-
Item - Move (Last dropped item) to (Random point in Item Stash Arena <gen>)
-
Hero - Drop the item from slot 2 of (Picked unit).
-
Item - Move (Last dropped item) to (Random point in Item Stash Arena <gen>)
-
Hero - Drop the item from slot 3 of (Picked unit).
-
Item - Move (Last dropped item) to (Random point in Item Stash Arena <gen>)
-
Hero - Drop the item from slot 4 of (Picked unit).
-
Item - Move (Last dropped item) to (Random point in Item Stash Arena <gen>)
-
Hero - Drop the item from slot 5 of (Picked unit).
-
Item - Move (Last dropped item) to (Random point in Item Stash Arena <gen>)
-
Hero - Drop the item from slot 6 of (Picked unit).
-
Item - Move (Last dropped item) to (Random point in Item Stash Arena <gen>)
-
Unit - Remove (Picked unit) from the game
-
-
-
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
-
Loop - Actions
-
Player - Make (Picked player) treat (Triggering player) as an Enemy
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked player) slot status) Equal to Is playing
-
-
Then - Actions
-
Player - Add Player_Currency[1] to (Picked player).Current gold
-
Player - Add Player_Currency[2] to (Picked player).Current lumber
-
-
Else - Actions
-
-
-
-
Trigger - Run Arena Unit Dies <gen> (checking conditions)
-
Trigger - Run Handicap System <gen> (checking conditions)
-
-
This is the "Arena Unit Dies" trigger that fires:
-
Arena Unit Dies
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) belongs to an ally of Player 8 (Pink).) Equal to True
-
((Triggering unit) is Summoned) Equal to False
-
((Triggering unit) is Magic Immune) Equal to False
-
-
Then - Actions
-
-------- ARENA ENEMY DIED (Non-Summoned): --------
-
Unit Group - Remove (Triggering unit) from Arena_Enemy_Group.
-
-------- --------
-
Set VariableSet Arena_Enemy_Alive = (Arena_Enemy_Alive - 1)
-
Set VariableSet Kill_Counter = (Kill_Counter + 1)
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Arena_Enemy_Alive Equal to 0
-
-
Then - Actions
-
Trigger - Run Arena Players Win Wave <gen> (ignoring conditions)
-
Trigger - Run Tier Change Event <gen> (checking conditions)
-
-
Else - Actions
-
-
-
Else - Actions
-
-------- PLAYER HERO DIED: --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) is A Hero) Equal to True
-
((Triggering unit) is an illusion) Equal to False
-
-
Then - Actions
-
Set VariableSet Player_Hero_Alive = (Player_Hero_Alive - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_Hero_Alive Equal to 0
-
-
Then - Actions
-
Trigger - Run Arena Players Lose Wave <gen> (ignoring conditions)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
And this one is the Handicap System:
-
Handicap System
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of players in (All allies of Player 1 (Red).)) Equal to 5
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Hero - Make (Picked player) Heroes gain 80.00% experience from future kills)
-
Player Group - Pick every player in (All allies of Player 8 (Pink).) and do (Player - Set (Picked player) handicap to 88.00%)
-
Player Group - Pick every player in (All allies of Player 8 (Pink).) and do (Player - Make (Picked player)'s units deal 88.00% of normal damage)
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of players in (All allies of Player 1 (Red).)) Equal to 4
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Hero - Make (Picked player) Heroes gain 63.00% experience from future kills)
-
Player Group - Pick every player in (All allies of Player 8 (Pink).) and do (Player - Set (Picked player) handicap to 76.00%)
-
Player Group - Pick every player in (All allies of Player 8 (Pink).) and do (Player - Make (Picked player)'s units deal 76.00% of normal damage)
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of players in (All allies of Player 1 (Red).)) Equal to 3
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Hero - Make (Picked player) Heroes gain 46.00% experience from future kills)
-
Player Group - Pick every player in (All allies of Player 8 (Pink).) and do (Player - Set (Picked player) handicap to 64.00%)
-
Player Group - Pick every player in (All allies of Player 8 (Pink).) and do (Player - Make (Picked player)'s units deal 64.00% of normal damage)
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of players in (All allies of Player 1 (Red).)) Equal to 2
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Hero - Make (Picked player) Heroes gain 29.00% experience from future kills)
-
Player Group - Pick every player in (All allies of Player 8 (Pink).) and do (Player - Set (Picked player) handicap to 52.00%)
-
Player Group - Pick every player in (All allies of Player 8 (Pink).) and do (Player - Make (Picked player)'s units deal 52.00% of normal damage)
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of players in (All allies of Player 1 (Red).)) Equal to 1
-
-
Then - Actions
-
Player Group - Pick every player in (All allies of Player 1 (Red).) and do (Hero - Make (Picked player) Heroes gain 12.00% experience from future kills)
-
Player Group - Pick every player in (All allies of Player 8 (Pink).) and do (Player - Set (Picked player) handicap to 40.00%)
-
Player Group - Pick every player in (All allies of Player 8 (Pink).) and do (Player - Make (Picked player)'s units deal 40.00% of normal damage)
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
-
-
-
-
-
-
-
What am I letting pass, that is causing this trouble? I couldn't find, and I already tried some weeks before coming here and asking for help.
Thanks in advance.