So, in the Arena on my map I have a dueling section and it's not working right and it's driving me crazy... It's works only some times and it makes no sense. Can someone look over these and tell me if you can see something I'm doing wrong?
This is the setup trigger:
This is the setup trigger:
-
Arena Setup
-
Events
- Time - Elapsed game time is 10.00 seconds
- Conditions
-
Actions
- Set Arena_Duel_On = False
- Unit - Move Arena Misc. Items Vendor 0182 <gen> instantly to (Center of Arena Item Vendor Move 2 <gen>)
- Unit - Move Arena Magic Items Vendor 0184 <gen> instantly to (Center of Arena Item Vendor Move <gen>)
- Unit - Move Dueling Referee 0097 <gen> instantly to (Center of Arena Duel Referee <gen>)
- Dialog - Create a dialog button for Arena_Duel_Accept labelled |c00008000Yes
- Set Arena_Duel_Yes = (Last created dialog Button)
- Dialog - Create a dialog button for Arena_Duel_Accept labelled |c00ea0000No
- Set Arena_Duel_No = (Last created dialog Button)
- Wait 5.00 seconds
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Players[(Integer A)] slot status) Equal to Is playing
- (Players[(Integer A)] controller) Equal to User
-
Then - Actions
- Dialog - Create a dialog button for Arena_Duel labelled ((|c00FF0303 + (Name of Players[(Integer A)])) + (( |c00f9f900( + |c00f9f900Lv ) + (|c00FF0303 + ((String((Hero level of Players_Current_Hero[(Integer A)]))) + ( |c00afafd8 + ((Name of Players_Current_Hero[(Integer A)]) + |c00f9f900)))))))
- Set Arena_Duel_Players[(Integer A)] = (Last created dialog Button)
- Dialog - Change the title of Arena_Duel_Accept to ((Duel + (|c00FF0303 + (Name of Arena_Duel_PlayerDeclaringDuel))) + ( |c00f9f900: + ((|c00afafd8 + (Name of Arena_Duel_HeroDeclaringDuel)) + (( |c00f9f900( + (|c00f9f900 + Lv )) + ((|c00ff2020 + (String((Hero level of Arena_Duel_HeroDeclaringDuel)))) + (|c0
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Trigger - Destroy (This trigger)
-
Events
-
Use Duel Item
-
Events
- Unit - A unit Acquires an item
-
Conditions
- Arena_Duel_On Equal to False
- (Item-type of (Item being manipulated)) Equal to Duel
-
Actions
- Set Arena_Duel_On = True
- Set Arena_Duel_PlayerClickedButton = False
- Set Arena_Duel_PlayerDeclaringDuel = (Owner of (Hero manipulating item))
- Set Arena_Duel_HeroDeclaringDuel = (Hero manipulating item)
- Dialog - Clear Arena_Duel
- Dialog - Clear Arena_Duel_Accept
- Dialog - Change the title of Arena_Duel to Duel Which Player?
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Players[(Integer A)] slot status) Equal to Is playing
- (Players[(Integer A)] controller) Equal to User
-
Then - Actions
- Dialog - Create a dialog button for Arena_Duel labelled ((|c00FF0303 + (Name of Players[(Integer A)])) + (( |c00f9f900( + |c00f9f900Lv ) + (|c00FF0303 + ((String((Hero level of Players_Current_Hero[(Integer A)]))) + ( |c00afafd8 + ((Name of Players_Current_Hero[(Integer A)]) + |c00f9f900)))))))
- Set Arena_Duel_Players[(Integer A)] = (Last created dialog Button)
- Dialog - Change the title of Arena_Duel_Accept to ((Duel + (|c00FF0303 + (Name of Arena_Duel_PlayerDeclaringDuel))) + ( |c00f9f900: + ((|c00afafd8 + (Name of Arena_Duel_HeroDeclaringDuel)) + (( |c00f9f900( + (|c00f9f900 + Lv )) + ((|c00ff2020 + (String((Hero level of Arena_Duel_HeroDeclaringDuel)))) + (|c0
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Dialog - Create a dialog button for Arena_Duel_Accept labelled |c00008000Yes
- Set Arena_Duel_Yes = (Last created dialog Button)
- Dialog - Create a dialog button for Arena_Duel_Accept labelled |c00ea0000No
- Set Arena_Duel_No = (Last created dialog Button)
- Dialog - Show Arena_Duel for (Owner of (Hero manipulating item))
-
Events
-
Duel Players
-
Events
- Dialog - A dialog button is clicked for Arena_Duel
-
Conditions
- Arena_Duel_On Equal to True
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to Arena_Duel_Player1
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering player) Not equal to Player 1 (Red)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Quests_Cleric_Active[1] Equal to False
- Quests_Druid_Active[1] Equal to False
- Quests_Ranger_Active[1] Equal to False
- Quests_Sorcerer_Active[1] Equal to False
- Quests_Thief_Active[1] Equal to False
- Quests_Warrior_Active[1] Equal to False
- Quests_Cleric_Active[(Player number of (Triggering player))] Equal to False
- Quests_Druid_Active[(Player number of (Triggering player))] Equal to False
- Quests_Ranger_Active[(Player number of (Triggering player))] Equal to False
- Quests_Sorcerer_Active[(Player number of (Triggering player))] Equal to False
- Quests_Thief_Active[(Player number of (Triggering player))] Equal to False
- Quests_Warrior_Active[(Player number of (Triggering player))] Equal to False
-
Then - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Equal to Player 1 (Red)
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Unit - Make (Picked unit) Invulnerable
- Set Arena_Duel_HeroAcceptingDuel = Players_Current_Hero[(Player number of (Owner of (Picked unit)))]
- Dialog - Show Arena_Duel_Accept for (Owner of (Picked unit))
- Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Sending r...
- Trigger - Run Is Player Idle <gen> (checking conditions)
- 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 in (Playable map area)) and do (Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Either yo...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5You can't...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to Arena_Duel_Player2
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering player) Not equal to Player 2 (Blue)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Quests_Cleric_Active[2] Equal to False
- Quests_Druid_Active[2] Equal to False
- Quests_Ranger_Active[2] Equal to False
- Quests_Sorcerer_Active[2] Equal to False
- Quests_Thief_Active[2] Equal to False
- Quests_Warrior_Active[2] Equal to False
- Quests_Cleric_Active[(Player number of (Triggering player))] Equal to False
- Quests_Druid_Active[(Player number of (Triggering player))] Equal to False
- Quests_Ranger_Active[(Player number of (Triggering player))] Equal to False
- Quests_Sorcerer_Active[(Player number of (Triggering player))] Equal to False
- Quests_Thief_Active[(Player number of (Triggering player))] Equal to False
- Quests_Warrior_Active[(Player number of (Triggering player))] Equal to False
-
Then - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Equal to Player 2 (Blue)
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Unit - Make (Picked unit) Invulnerable
- Set Arena_Duel_HeroAcceptingDuel = Players_Current_Hero[(Player number of (Owner of (Picked unit)))]
- Dialog - Show Arena_Duel_Accept for (Owner of (Picked unit))
- Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Sending r...
- Trigger - Run Is Player Idle <gen> (checking conditions)
- 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 in (Playable map area)) and do (Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Either yo...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5You can't...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to Arena_Duel_Player3
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering player) Not equal to Player 3 (Teal)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Quests_Cleric_Active[3] Equal to False
- Quests_Druid_Active[3] Equal to False
- Quests_Ranger_Active[3] Equal to False
- Quests_Sorcerer_Active[3] Equal to False
- Quests_Thief_Active[3] Equal to False
- Quests_Warrior_Active[3] Equal to False
- Quests_Cleric_Active[(Player number of (Triggering player))] Equal to False
- Quests_Druid_Active[(Player number of (Triggering player))] Equal to False
- Quests_Ranger_Active[(Player number of (Triggering player))] Equal to False
- Quests_Sorcerer_Active[(Player number of (Triggering player))] Equal to False
- Quests_Thief_Active[(Player number of (Triggering player))] Equal to False
- Quests_Warrior_Active[(Player number of (Triggering player))] Equal to False
-
Then - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Equal to Player 3 (Teal)
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Unit - Make (Picked unit) Invulnerable
- Set Arena_Duel_HeroAcceptingDuel = Players_Current_Hero[(Player number of (Owner of (Picked unit)))]
- Dialog - Show Arena_Duel_Accept for (Owner of (Picked unit))
- Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Sending r...
- Trigger - Run Is Player Idle <gen> (checking conditions)
- 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 in (Playable map area)) and do (Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Either yo...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5You can't...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to Arena_Duel_Player4
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering player) Not equal to Player 4 (Purple)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Quests_Cleric_Active[4] Equal to False
- Quests_Druid_Active[4] Equal to False
- Quests_Ranger_Active[4] Equal to False
- Quests_Sorcerer_Active[4] Equal to False
- Quests_Thief_Active[4] Equal to False
- Quests_Warrior_Active[4] Equal to False
- Quests_Cleric_Active[(Player number of (Triggering player))] Equal to False
- Quests_Druid_Active[(Player number of (Triggering player))] Equal to False
- Quests_Ranger_Active[(Player number of (Triggering player))] Equal to False
- Quests_Sorcerer_Active[(Player number of (Triggering player))] Equal to False
- Quests_Thief_Active[(Player number of (Triggering player))] Equal to False
- Quests_Warrior_Active[(Player number of (Triggering player))] Equal to False
-
Then - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Equal to Player 4 (Purple)
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Unit - Make (Picked unit) Invulnerable
- Set Arena_Duel_HeroAcceptingDuel = Players_Current_Hero[(Player number of (Owner of (Picked unit)))]
- Dialog - Show Arena_Duel_Accept for (Owner of (Picked unit))
- Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Sending r...
- Trigger - Run Is Player Idle <gen> (checking conditions)
- 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 in (Playable map area)) and do (Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Either yo...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5You can't...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to Arena_Duel_Player5
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering player) Not equal to Player 5 (Yellow)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Quests_Cleric_Active[5] Equal to False
- Quests_Druid_Active[5] Equal to False
- Quests_Ranger_Active[5] Equal to False
- Quests_Sorcerer_Active[5] Equal to False
- Quests_Thief_Active[5] Equal to False
- Quests_Warrior_Active[5] Equal to False
- Quests_Cleric_Active[(Player number of (Triggering player))] Equal to False
- Quests_Druid_Active[(Player number of (Triggering player))] Equal to False
- Quests_Ranger_Active[(Player number of (Triggering player))] Equal to False
- Quests_Sorcerer_Active[(Player number of (Triggering player))] Equal to False
- Quests_Thief_Active[(Player number of (Triggering player))] Equal to False
- Quests_Warrior_Active[(Player number of (Triggering player))] Equal to False
-
Then - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Equal to Player 5 (Yellow)
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Unit - Make (Picked unit) Invulnerable
- Set Arena_Duel_HeroAcceptingDuel = Players_Current_Hero[(Player number of (Owner of (Picked unit)))]
- Dialog - Show Arena_Duel_Accept for (Owner of (Picked unit))
- Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Sending r...
- Trigger - Run Is Player Idle <gen> (checking conditions)
- 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 in (Playable map area)) and do (Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Either yo...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5You can't...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to Arena_Duel_Player6
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering player) Not equal to Player 6 (Orange)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Quests_Cleric_Active[6] Equal to False
- Quests_Druid_Active[6] Equal to False
- Quests_Ranger_Active[6] Equal to False
- Quests_Sorcerer_Active[6] Equal to False
- Quests_Thief_Active[6] Equal to False
- Quests_Warrior_Active[6] Equal to False
- Quests_Cleric_Active[(Player number of (Triggering player))] Equal to False
- Quests_Druid_Active[(Player number of (Triggering player))] Equal to False
- Quests_Ranger_Active[(Player number of (Triggering player))] Equal to False
- Quests_Sorcerer_Active[(Player number of (Triggering player))] Equal to False
- Quests_Thief_Active[(Player number of (Triggering player))] Equal to False
- Quests_Warrior_Active[(Player number of (Triggering player))] Equal to False
-
Then - Actions
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Equal to Player 6 (Orange)
- ((Picked unit) is A Hero) Equal to True
-
Then - Actions
- Unit - Make (Picked unit) Invulnerable
- Set Arena_Duel_HeroAcceptingDuel = Players_Current_Hero[(Player number of (Owner of (Picked unit)))]
- Dialog - Show Arena_Duel_Accept for (Owner of (Picked unit))
- Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Sending r...
- Trigger - Run Is Player Idle <gen> (checking conditions)
- 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 in (Playable map area)) and do (Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Either yo...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (Triggering player), at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5You can't...
- Set Arena_Duel_On = False
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Is Player Idle
- Events
-
Conditions
- Arena_Duel_On Equal to True
-
Actions
- Wait 10.00 seconds
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of Arena_Duel_HeroAcceptingDuel) Equal to Players[(Integer A)]
- Arena_Duel_PlayerClickedButton Equal to False
-
Then - Actions
- Set Arena_Duel_On = False
- Set Arena_Duel_PlayersIdle[(Player number of Arena_Duel_PlayerAcceptingDuel)] = True
- Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5Player di...
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
Last edited: