| 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 trigger of the person initiating the duel:
This is the trigger for player that got the request:
Is the player Idle:
This is the trigger for what button accepting player clicks
Trigger: Players Answer
 Events
  Dialog - A dialog button is clicked for Arena_Duel_Accept
 Conditions
 Actions
  If (All Conditions are True) then do (Then Actions) else do (Else Actions)
   If - Conditions
    Arena_Duel_On Equal to True
   Then - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
     If - Conditions
      (Clicked dialog button) Equal to Arena_Duel_Yes
     Then - Actions
      If (All Conditions are True) then do (Then Actions) else do (Else Actions)
       If - Conditions
        Arena_Duel_PlayersIdle[(Player number of (Triggering player))] Equal to False
       Then - Actions
        Set Arena_Duel_PlayerClickedButton = True
        Set Arena_Duel_PlayerAcceptingDuel = (Triggering player)
        Set Disable_Teleport_Spell[(Player number of (Triggering player))] = True
        Unit Group - Pick every unit in (Units in Arena Duel Area <gen>) and do (Actions)
         Loop - Actions
          If (All Conditions are True) then do (Then Actions) else do (Else Actions)
           If - Conditions
            (Owner of (Picked unit)) Not equal to Player 11 (Dark Green)
            (Owner of (Picked unit)) Not equal to Neutral Passive
            (Owner of (Picked unit)) Not equal to Arena_Duel_PlayerDeclaringDuel
           Then - Actions
            Unit - Move (Picked unit) instantly to (Center of Arena Duel Move Players Here <gen>)
           Else - Actions
            Set Disable_Teleport_Spell[(Player number of (Owner of (Picked unit)))] = True
        Camera - Lock camera target for (Triggering player) to Shade 0120 <gen>, offset by (0.00, 0.00) using Default rotation
        Camera - Lock camera target for Arena_Duel_PlayerDeclaringDuel to Shade 0120 <gen>, offset by (0.00, 0.00) using Default rotation
        Item - Remove (Item carried by Arena_Duel_HeroAcceptingDuel of type Boots of Speed (Testing Only))
        Item - Remove (Item carried by Arena_Duel_HeroDeclaringDuel of type Boots of Speed (Testing Only))
        Unit - Move Arena_Duel_HeroDeclaringDuel instantly to (Center of Arena Duel Area Left Side <gen>), facing (Center of Arena Duel Area Right Side <gen>)
        Unit - Move Arena_Duel_HeroAcceptingDuel instantly to (Center of Arena Duel Area Right Side <gen>), facing (Center of Arena Duel Area Left Side <gen>)
        Unit - Set life of Arena_Duel_HeroDeclaringDuel to 100.00%
        Unit - Set mana of Arena_Duel_HeroDeclaringDuel to 100.00%
        Unit - Set life of Arena_Duel_HeroAcceptingDuel to 100.00%
        Unit - Set mana of Arena_Duel_HeroAcceptingDuel to 100.00%
        Game - Display to Arena_Duel_PlayerAcceptingDuel, at offset (0.00, 0.00) for 1.00 seconds the text: ...
        Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 1.00 seconds the text: ...
        Wait 1.00 seconds
        Game - Display to Arena_Duel_PlayerAcceptingDuel, at offset (0.00, 0.00) for 1.00 seconds the text: ...
        Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 1.00 seconds the text: ...
        Wait 1.00 seconds
        Game - Display to Arena_Duel_PlayerAcceptingDuel, at offset (0.00, 0.00) for 1.00 seconds the text: ...
        Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 1.00 seconds the text: ...
        Player - Make Arena_Duel_PlayerAcceptingDuel treat Arena_Duel_PlayerDeclaringDuel as an Enemy
        Player - Make Arena_Duel_PlayerDeclaringDuel treat Arena_Duel_PlayerAcceptingDuel as an Enemy
        Unit - Make Arena_Duel_HeroAcceptingDuel Vulnerable
        Unit - Make Arena_Duel_HeroDeclaringDuel Vulnerable
        Unit - Remove classification of An Ancient from Arena_Duel_HeroDeclaringDuel
        Unit - Remove classification of An Ancient from Arena_Duel_HeroAcceptingDuel
        Unit - Order Arena_Duel_HeroAcceptingDuel to Attack Arena_Duel_HeroDeclaringDuel
        Unit - Order Arena_Duel_HeroDeclaringDuel to Attack Arena_Duel_HeroAcceptingDuel
       Else - Actions
        Set Arena_Duel_PlayersIdle[(Player number of (Triggering player))] = False
        Unit - Make Arena_Duel_HeroAcceptingDuel Vulnerable
     Else - Actions
      If (All Conditions are True) then do (Then Actions) else do (Else Actions)
       If - Conditions
        (Clicked dialog button) Equal to Arena_Duel_No
       Then - Actions
        Set Arena_Duel_PlayerClickedButton = True
        Set Arena_Duel_On = False
        Game - Display to Arena_Duel_PlayerDeclaringDuel, at offset (0.00, 0.00) for 5.00 seconds the text: |c0096ecf5This play...
        Unit - Make Arena_Duel_HeroAcceptingDuel Vulnerable
        Unit - Make Arena_Duel_HeroDeclaringDuel Vulnerable
       Else - Actions
   Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
     If - Conditions
      (Clicked dialog button) Equal to Arena_Duel_Yes
      Arena_Duel_PlayersIdle[(Player number of (Triggering player))] Equal to True
     Then - Actions
      Set Arena_Duel_PlayersIdle[(Player number of (Triggering player))] = False
      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
          ((Picked unit) is A Hero) Equal to True
          (Owner of (Picked unit)) Equal to (Triggering player)
         Then - Actions
          Unit - Make (Picked unit) Vulnerable
         Else - Actions
     Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
     If - Conditions
      (Clicked dialog button) Equal to Arena_Duel_No
      Arena_Duel_PlayersIdle[(Player number of (Triggering player))] Equal to True
     Then - Actions
      Set Arena_Duel_PlayersIdle[(Player number of (Triggering player))] = False
      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
          ((Picked unit) is A Hero) Equal to True
          (Owner of (Picked unit)) Equal to (Triggering player)
         Then - Actions
          Unit - Make (Picked unit) Vulnerable
         Else - Actions
     Else - Actions
And finally this is the trigger if one player wins:
Ok... SO: - Sometimes what happens is when you click a button it pauses you and does nothing @ all when your the one declaring the duel. Which doesn't make any sense @ all.
- Also, sometimes it will freeze both units and pause them and do nothing else. Sometimes after it get's both players into the duel, after 1 player wins the winner trigger doesn't fire and the player is stuck in the dueling pit. Also, if player gets out by other player killing him players remain enemies and don't have Ancient classification anymore.
- Sometimes also after being frozen (you can use teleport to unfreeze yourself) and the hero's armor will be invulnerable.
Can anyone see where I went wrong cause it's driving me crazy  |