- Joined
- Nov 30, 2013
- Messages
- 926
I'm getting tired fixing my duel trigger.
The duel suppose to choose a random player from each teams. (except player 11 and 12.)
The problem was that the gametext showed like this "(Player's name) VS (none)" or "(none) VS (none)"
Another was if the trigger run like this for example "bear_369 VS Computer", my hero, computer's hero, or both haven't teleported to the arena.
And last, all units in the map was being teleported to the Team 1's Base.
The duel suppose to choose a random player from each teams. (except player 11 and 12.)
-
Duel Sets
- Events
- Conditions
-
Actions
-
Player Group - Pick every player in (Player group((Random player from (All allies of Player 6 (Orange))))) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Picked player) Not equal to Player 12 (Brown)
-
Then - Actions
- Set DuelPlayerPicked[DuelPlayerT[2]] = (Picked player)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Player Group - Pick every player in (Player group((Random player from (All allies of Player 1 (Red))))) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Picked player) Not equal to Player 11 (Dark Green)
-
Then - Actions
- Set DuelPlayerPicked[DuelPlayerT[1]] = (Picked player)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- -------- Transporting --------
-
Player Group - Pick every player in (All allies of Player 6 (Orange)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Picked player) Not equal to DuelPlayerPicked[DuelPlayerT[2]]
- (Picked player) Not equal to Neutral Hostile
- (Picked player) Not equal to Neutral Passive
- (Picked player) Not equal to Neutral Victim
- (Picked player) Not equal to Neutral Extra
-
Then - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
-
Loop - Actions
- Unit - Move (Picked unit) instantly to (Center of Team 2 Spawn <gen>)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Picked player) Not equal to DuelPlayerPicked[DuelPlayerT[1]]
- (Picked player) Not equal to Neutral Hostile
- (Picked player) Not equal to Neutral Passive
- (Picked player) Not equal to Neutral Victim
- (Picked player) Not equal to Neutral Extra
-
Then - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
-
Loop - Actions
- Unit - Move (Picked unit) instantly to (Center of Team 1 Spawn <gen>)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is in PlayerInTrap) Equal to True
-
Then - Actions
- Unit Group - Remove (Picked unit) from PlayerInTrap
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Camera - Pan camera for (Picked player) to (Center of Hero Arena <gen>) over 1.50 seconds
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Picked player)) and do (Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units owned by DuelPlayerPicked[DuelPlayerT[1]]) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Set DuelUnit[1] = (Picked unit)
- Unit - Set life of (Picked unit) to 100.00%
- Unit - Set mana of (Picked unit) to 100.00%
- Unit - Move (Picked unit) instantly to (Center of Team 1 Arena Spawn <gen>), facing (Center of Team 2 Arena Spawn <gen>)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units owned by DuelPlayerPicked[DuelPlayerT[2]]) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Set DuelUnit[2] = (Picked unit)
- Unit - Set life of (Picked unit) to 100.00%
- Unit - Set mana of (Picked unit) to 100.00%
- Unit - Move (Picked unit) instantly to (Center of Team 2 Arena Spawn <gen>), facing (Center of Team 1 Arena Spawn <gen>)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Game - Display to (All players) the text: ((Name of DuelPlayerPicked[DuelPlayerT[1]]) + ( VS + (Name of DuelPlayerPicked[DuelPlayerT[2]])))
- Trigger - Run Revival Hero <gen> (checking conditions)
- Wait 3.00 seconds
- Game - Display to (All players) the text: 3
- Sound - Play BattleNetTick <gen>
- Wait 1.00 seconds
- Game - Display to (All players) the text: 2
- Sound - Play BattleNetTick <gen>
- Wait 1.00 seconds
- Game - Display to (All players) the text: 1
- Sound - Play BattleNetTick <gen>
- Wait 1.00 seconds
- Game - Display to (All players) the text: Go!
- Trigger - Run Duel Start <gen> (checking conditions)
- Sound - Play ArrangedTeamInvitation <gen>
-
Player Group - Pick every player in (Player group((Random player from (All allies of Player 6 (Orange))))) and do (Actions)
The problem was that the gametext showed like this "(Player's name) VS (none)" or "(none) VS (none)"
Another was if the trigger run like this for example "bear_369 VS Computer", my hero, computer's hero, or both haven't teleported to the arena.
And last, all units in the map was being teleported to the Team 1's Base.