There would be something that I have done wrong with my Duel triggers. But strange enough I can't find my mistakes. I hope someone else could help me figure them out, thanks for taking your time to read this.
My map is a hero arena : 4 vs 4 vs 4.
Duel Trigger
Setup Duel (Trigger 1)
Start the Duel (Trigger 2)
XPlayerHEROX[Number of Player] = the controlled Hero of the player.
Duel Ends (Trigger 3)
This trigger is initially turned off.
Restore Game (Trigger 4)
My map is a hero arena : 4 vs 4 vs 4.
Duel Trigger
Setup Duel (Trigger 1)
Code:
Setup Duel
Events
Time - Elapsed game time is 60.00 seconds
Conditions
Actions
-------- Setup --------
Wait 5.00 seconds
Countdown Timer - Start Duel as a Repeating timer that will expire in 480.00 seconds
Countdown Timer - Create a timer window for Duel with title |c00128080Team Duel...
Set DuelTimerWindow = (Last created timer window)
Countdown Timer - Show DuelTimerWindow
Custom script: call DestroyTrigger(GetTriggeringTrigger())
Code:
Start the Duel
Events
Time - Duel expires
Conditions
Actions
Trigger - Turn on Duel Abuse <gen>
Countdown Timer - Pause Duel
Unit - Pause all units
Game - Display to (All players) the text: It is time to disco...
Set bDuel = True
Wait 5.00 seconds
-------- UNHIDE --------
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Unit - Unhide XPlayersHEROX[(Integer A)]
-------- Team 1 --------
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
If (XPlayersHEROX[(Integer A)] Equal to No unit) then do (Do nothing) else do (Unit Group - Add XPlayersHEROX[(Integer A)] to TeamDuel1)
If ((Player 1 (Red) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[1] instantly to (Center of DuelSpot1 <gen>)) else do (Unit Group - Remove (Picked unit) from TeamDuel1)
If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[2] instantly to (Center of DuelSpot2 <gen>)) else do (Unit Group - Remove XPlayersHEROX[2] from TeamDuel1)
If ((Player 3 (Teal) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[3] instantly to (Center of DuelSpot3 <gen>)) else do (Unit Group - Remove XPlayersHEROX[3] from TeamDuel1)
If ((Player 4 (Purple) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[4] instantly to (Center of DuelSpot4 <gen>)) else do (Unit Group - Remove XPlayersHEROX[4] from TeamDuel1)
-------- Team 2 --------
For each (Integer A) from 5 to 8, do (Actions)
Loop - Actions
If (XPlayersHEROX[(Integer A)] Equal to No unit) then do (Do nothing) else do (Unit Group - Add XPlayersHEROX[(Integer A)] to TeamDuel2)
If ((Player 5 (Yellow) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[5] instantly to (Center of DuelSpot5 <gen>)) else do (Unit Group - Remove XPlayersHEROX[5] from TeamDuel2)
If ((Player 6 (Orange) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[6] instantly to (Center of DuelSpot6 <gen>)) else do (Unit Group - Remove XPlayersHEROX[6] from TeamDuel2)
If ((Player 7 (Green) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[7] instantly to (Center of DuelSpot7 <gen>)) else do (Unit Group - Remove XPlayersHEROX[7] from TeamDuel2)
If ((Player 8 (Pink) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[8] instantly to (Center of DuelSpot8 <gen>)) else do (Unit Group - Remove XPlayersHEROX[8] from TeamDuel2)
-------- Team 3 --------
For each (Integer A) from 9 to 12, do (Actions)
Loop - Actions
If (XPlayersHEROX[(Integer A)] Equal to No unit) then do (Do nothing) else do (Unit Group - Add XPlayersHEROX[(Integer A)] to TeamDuel3)
If ((Player 9 (Gray) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[9] instantly to (Center of DuelSpot9 <gen>)) else do (Unit Group - Remove XPlayersHEROX[9] from TeamDuel3)
If ((Player 10 (Light Blue) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[10] instantly to (Center of DuelSpot10 <gen>)) else do (Unit Group - Remove XPlayersHEROX[10] from TeamDuel3)
If ((Player 11 (Dark Green) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[11] instantly to (Center of DuelSpot11 <gen>)) else do (Unit Group - Remove XPlayersHEROX[11] from TeamDuel3)
If ((Player 12 (Brown) slot status) Equal to Is playing) then do (Unit - Move XPlayersHEROX[12] instantly to (Center of DuelSpot12 <gen>)) else do (Unit Group - Remove XPlayersHEROX[12] from TeamDuel3)
-------- Health and Mana --------
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Unit - Set life of XPlayersHEROX[(Integer A)] to 100.00%
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Unit - Set mana of XPlayersHEROX[(Integer A)] to 100.00%
-------- Camera --------
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Camera - Pan camera for (Owner of XPlayersHEROX[(Integer A)]) to (Position of XPlayersHEROX[(Integer A)]) over 0.00 seconds
-------- Text --------
Game - Display to (All players) the text: A battle of friends...
-------- Start --------
Trigger - Turn on Duel Ends <gen>
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Unit - Unpause XPlayersHEROX[(Integer A)]
Duel Ends (Trigger 3)
Code:
Duel Ends
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((TeamDuel1 is empty) Equal to True) and ((TeamDuel2 is empty) Equal to True)
Then - Actions
Game - Display to (All players) for 7.00 seconds the text: Team 3 has won the ...
Wait 3.00 seconds
Trigger - Run Restore Game <gen> (checking conditions)
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((TeamDuel1 is empty) Equal to True) and ((TeamDuel3 is empty) Equal to True)
Then - Actions
Game - Display to (All players) for 7.00 seconds the text: Team 2 has won the ...
Wait 3.00 seconds
Trigger - Run Restore Game <gen> (checking conditions)
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((TeamDuel2 is empty) Equal to True) and ((TeamDuel3 is empty) Equal to True)
Then - Actions
Game - Display to (All players) for 7.00 seconds the text: Team 1 has won the ...
Wait 3.00 seconds
Trigger - Run Restore Game <gen> (checking conditions)
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((TeamDuel1 is empty) Equal to True) and (((TeamDuel2 is empty) Equal to True) and ((TeamDuel3 is empty) Equal to True))
Then - Actions
Game - Display to (All players) for 7.00 seconds the text: Draw!
Wait 3.00 seconds
Trigger - Run Restore Game <gen> (checking conditions)
Trigger - Turn off (This trigger)
Else - Actions
Do nothing
Restore Game (Trigger 4)
Code:
Restore Game
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Trigger - Turn off Duel Abuse <gen>
Set bDuel = False
Countdown Timer - Resume Duel
-------- Team 1 Restored --------
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
Unit - Move XPlayersHEROX[(Integer A)] instantly to (Center of Team 1 <gen>)
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
Camera - Pan camera for (Owner of XPlayersHEROX[(Integer A)]) to (Center of Team 1 <gen>) over 0.20 seconds
-------- Team 2 Restored --------
For each (Integer A) from 5 to 8, do (Actions)
Loop - Actions
Unit - Move XPlayersHEROX[(Integer A)] instantly to (Center of Team 2 <gen>)
For each (Integer A) from 5 to 8, do (Actions)
Loop - Actions
Camera - Pan camera for (Owner of XPlayersHEROX[(Integer A)]) to (Center of Team 2 <gen>) over 0.20 seconds
-------- Team 3 Restored --------
For each (Integer A) from 9 to 12, do (Actions)
Loop - Actions
Unit - Move XPlayersHEROX[(Integer A)] instantly to (Center of Team 3 <gen>)
For each (Integer A) from 9 to 12, do (Actions)
Loop - Actions
Camera - Pan camera for (Owner of XPlayersHEROX[(Integer A)]) to (Center of Team 3 <gen>) over 0.20 seconds
Wait 2.00 seconds
Unit - Unpause all units