I am trying to set up a duel thing just 2 problems
1 all players are put on one team
2 it critical errors if they kill each other ~.~
Trigger:
Timer
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(D_Time_M Equal to 0) and (D_Time_S Equal to 1)
Then - Actions
Set D_Time_M = 10
Set D_Time_S = 0
Trigger - Turn on Begin <gen>
Trigger - Turn on Hero Dies <gen>
Trigger - Turn off Revive <gen>
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
D_Time_S Equal to 0
Then - Actions
Set D_Time_S = 59
Set D_Time_M = (D_Time_M - 1)
Else - Actions
Set D_Time_S = (D_Time_S - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
D_Time_S Less than 10
Then - Actions
Set Time_S = (0 + (String(D_Time_S)))
Else - Actions
Set Time_S = (String(D_Time_S))
Multiboard - Change the title of (Last created multiboard) to (Duel in + ((String(D_Time_M)) + (: + Time_S)))
Trigger:
Begin
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Set tempintiger3 = 0
Player Group - Pick every player in All_Players and do (Actions)
Loop - Actions
Player Group - Add (Picked player) to Temp_P_Group
Player Group - Pick every player in Temp_P_Group and do (Actions)
Loop - Actions
Set tempintiger = 0
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Kills[(Integer A)] Greater than or equal to tempintiger
Then - Actions
Set tempintiger2 = (Integer A)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer A) Equal to 12
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempintiger3 Equal to 0
Then - Actions
Player Group - Add (Player(tempintiger2)) to Team_A
Set tempintiger3 = 1
Else - Actions
Player Group - Add (Player(tempintiger2)) to Team_B
Set tempintiger3 = 0
Player Group - Remove (Player(tempintiger2)) from Temp_P_Group
Else - Actions
Player Group - Make Team_A treat Team_B as an Enemy with shared vision
Player Group - Make Team_B treat Team_A as an Enemy with shared vision
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Player((Integer A)))) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Not equal to Hero Soul
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer A))) is in Team_A) Equal to True
Then - Actions
Region - Center Duel_Region[(Integer A)] on (Position of (Picked unit))
Set Duel_Hp[(Integer A)] = (Integer((Life of (Picked unit))))
Set Duel_Mp[(Integer A)] = (Integer((Mana of (Picked unit))))
Camera - Pan camera for (Owner of (Picked unit)) to (Center of dueler 1 <gen>) over 0.00 seconds
Unit - Move (Picked unit) instantly to (Center of dueler 1 <gen>)
Unit - Set life of (Picked unit) to 100.00%
Unit - Set mana of (Picked unit) to 100.00%
Else - Actions
Region - Center Duel_Region[(Integer A)] on (Position of (Picked unit))
Set Duel_Hp[(Integer A)] = (Integer((Life of (Picked unit))))
Set Duel_Mp[(Integer A)] = (Integer((Mana of (Picked unit))))
Camera - Pan camera for (Owner of (Picked unit)) to (Center of dueler 2 <gen>) over 0.00 seconds
Unit - Move (Picked unit) instantly to (Center of dueler 2 <gen>)
Unit - Set life of (Picked unit) to 100.00%
Unit - Set mana of (Picked unit) to 100.00%
Else - Actions
Unit - Pause (Picked unit)
Leaderboard - Create a leaderboard for (All players) titled Score
Leaderboard - Show (Last created leaderboard)
Set Team_A_S = 0
Set Team_B_S = 0
Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label Team A and value 0
Leaderboard - Add Player 2 (Blue) to (Last created leaderboard) with label Team B and value 0
Trigger - Turn off (This trigger)
Trigger:
Hero Dies
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
((Triggering unit) belongs to an enemy of Player 1 (Red)) Equal to False
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Hero - Instantly revive (Triggering unit) at (Center of Duel_Region[(Integer A)]), Show revival graphics
Unit - Set life of (Triggering unit) to (Real(Duel_Hp[(Integer A)]))
Unit - Set mana of (Triggering unit) to (Real(Duel_Mp[(Integer A)]))
Unit - Pause (Triggering unit)
Multiboard - Set the text for Scoreboard item in column 4, row ((Integer A) + 1) to (String(Die[(Integer A)]))
Set Die[(Integer A)] = (Die[(Integer A)] + 1)
Else - Actions
Player Group - Pick every player in Team_A and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to (Picked player)
Then - Actions
Set Team_B_S = (Team_B_S + 1)
Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to Team_B_S
Else - Actions
Set Team_A_S = (Team_A_S + 1)
Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to Team_A_S
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in Team_A) Equal to Team_B_S
Then - Actions
Unit - Unpause all units
Game - Display to (All players) the text: Team B won the duel...
Leaderboard - Destroy (Last created leaderboard)
Trigger - Turn on Timer <gen>
Trigger - Turn on Revive <gen>
Trigger - Turn off Begin <gen>
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in Team_B) Equal to Team_A_S
Then - Actions
Unit - Unpause all units
Game - Display to (All players) the text: Team A won the duel...
Leaderboard - Destroy (Last created leaderboard)
Trigger - Turn on Timer <gen>
Trigger - Turn on Revive <gen>
Trigger - Turn off Begin <gen>
Trigger - Turn off (This trigger)