HELP! I can't find an error in these triggers!

Status
Not open for further replies.
Level 2
Joined
Jun 19, 2010
Messages
6
Basically I have been working on my own wc3 rpg map. Well, I am doing a hero selection system via Dialogs. Well the deal is, each time I select to pick a "Human" hero no matter what class I choose, I get a mage. Same is true with orc. I need help locating the problem, as I have looked for a very long time. I really want to LAN my map tonight, but I can't if we can't choose heroes! Thanks!

It doesn't matter which class type or class I choose, even if I choose human warrior, I will get human mage, and the same is true for orc. If I choose orc brewmaster, I will get orc mage. Can someone please help! I'd be GREATLY GRATEFUL!

EDIT: Thanks for that link death, I was looking for it :p, it's been a veryy long time since I've evened opened my wc3. But here is the triggers in the correct format:

(Trigger 1/6)
  • Choose Faction Copy
    • Events
      • Unit - A unit enters Choose your side <gen>
    • Conditions
      • ((Owner of (Triggering unit)) is an ally of Player 10 (Light Blue)) Equal to False
      • ((Owner of (Triggering unit)) is an ally of Player 11 (Dark Green)) Equal to False
    • Actions
      • Dialog - Clear Hero_Descriptions[(Player number of (Owner of (Triggering unit)))]
      • Dialog - Create a dialog button for Hero_Descriptions[(Player number of (Owner of (Triggering unit)))] labelled Yes
      • Set Hero_Descriptions_Yes[(Player number of (Owner of (Triggering unit)))] = (Last created dialog Button)
      • Dialog - Create a dialog button for Hero_Descriptions[(Player number of (Owner of (Triggering unit)))] labelled No
      • Set Hero_Descriptions_No[(Player number of (Owner of (Triggering unit)))] = (Last created dialog Button)
      • Dialog - Change the title of Hero_Descriptions[(Player number of (Owner of (Triggering unit)))] to Would you like to r...
      • Dialog - Show Hero_Descriptions[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))
Trigger (2/6)
  • Choose Faction Ini
    • Events
      • Dialog - A dialog button is clicked for Hero_Descriptions[(Player number of Player 1 (Red))]
      • Dialog - A dialog button is clicked for Hero_Descriptions[(Player number of Player 2 (Blue))]
      • Dialog - A dialog button is clicked for Hero_Descriptions[(Player number of Player 3 (Teal))]
      • Dialog - A dialog button is clicked for Hero_Descriptions[(Player number of Player 4 (Purple))]
      • Dialog - A dialog button is clicked for Hero_Descriptions[(Player number of Player 5 (Yellow))]
      • Dialog - A dialog button is clicked for Hero_Descriptions[(Player number of Player 6 (Orange))]
      • Dialog - A dialog button is clicked for Hero_Descriptions[(Player number of Player 7 (Green))]
      • Dialog - A dialog button is clicked for Hero_Descriptions[(Player number of Player 8 (Pink))]
    • Conditions
      • ((Triggering player) is an ally of Player 10 (Light Blue)) Equal to False
      • ((Triggering player) is an ally of Player 11 (Dark Green)) Equal to False
      • (Clicked dialog button) Equal to Hero_Descriptions_No[(Player number of (Triggering player))]
    • Actions
      • Sound - Play AkamaWarcry1 <gen>
      • Game - Display to (Player group((Triggering player))) the text: |cff7777aaDargon|r:...
      • Dialog - Clear Race_Choose_Dialog[(Player number of (Triggering player))]
      • Dialog - Create a dialog button for Race_Choose_Dialog[(Player number of (Triggering player))] labelled Humans
      • Set Human_Dialog = (Last created dialog Button)
      • Dialog - Create a dialog button for Race_Choose_Dialog[(Player number of (Triggering player))] labelled Orcs
      • Set Orcs_Dialog = (Last created dialog Button)
      • Dialog - Change the title of Race_Choose_Dialog[(Player number of (Triggering player))] to Choose your faction...
      • Dialog - Show Race_Choose_Dialog[(Player number of (Triggering player))] for (Triggering player)
      • Dialog - Clear Hero_Descriptions[(Player number of (Triggering player))]
      • Dialog - Hide Hero_Descriptions[(Player number of (Triggering player))] for (Triggering player)
Trigger (3/6)
  • Dialog Faction
    • Events
      • Dialog - A dialog button is clicked for Race_Choose_Dialog[(Player number of Player 1 (Red))]
      • Dialog - A dialog button is clicked for Race_Choose_Dialog[(Player number of Player 2 (Blue))]
      • Dialog - A dialog button is clicked for Race_Choose_Dialog[(Player number of Player 3 (Teal))]
      • Dialog - A dialog button is clicked for Race_Choose_Dialog[(Player number of Player 4 (Purple))]
      • Dialog - A dialog button is clicked for Race_Choose_Dialog[(Player number of Player 5 (Yellow))]
      • Dialog - A dialog button is clicked for Race_Choose_Dialog[(Player number of Player 6 (Orange))]
      • Dialog - A dialog button is clicked for Race_Choose_Dialog[(Player number of Player 7 (Green))]
      • Dialog - A dialog button is clicked for Race_Choose_Dialog[(Player number of Player 8 (Pink))]
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Orcs_Dialog
        • Then - Actions
          • Set PlayerIsOrc[(Player number of (Triggering player))] = True
          • Dialog - Hide Race_Choose_Dialog[(Player number of (Triggering player))] for (Triggering player)
          • Dialog - Clear Race_Choose_Dialog[(Player number of (Triggering player))]
          • Player - Make (Triggering player) treat Player 11 (Dark Green) as an Ally with shared vision
          • Player - Make Player 11 (Dark Green) treat (Triggering player) as an Ally with shared vision
          • Player - For (Triggering player), turn Alliance (non-aggression) On toward Player 11 (Dark Green)
          • Game - Display to (All players) the text: ((Name of (Triggering player)) + chose to side with the |cff32cd32Orcs|r. He/She is now |cffff0000Hostile|r with the humans.)
          • Dialog - Clear Class_Type_Dialog[(Player number of (Triggering player))]
          • Dialog - Create a dialog button for Class_Type_Dialog[(Player number of (Triggering player))] labelled Tank
          • Set Class_Type_Tank[(Player number of (Triggering player))] = (Last created dialog Button)
          • Dialog - Create a dialog button for Class_Type_Dialog[(Player number of (Triggering player))] labelled Damage
          • Set Class_Type_Damage[(Player number of (Triggering player))] = (Last created dialog Button)
          • Dialog - Create a dialog button for Class_Type_Dialog[(Player number of (Triggering player))] labelled Support
          • Set Class_Type_TankSupport[(Player number of (Triggering player))] = (Last created dialog Button)
          • Dialog - Change the title of Class_Type_Dialog[(Player number of (Triggering player))] to Class Type:
          • Dialog - Show Class_Type_Dialog[(Player number of (Triggering player))] for (Triggering player)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Human_Dialog
            • Then - Actions
              • Set PlayerIsOrc[(Player number of (Triggering player))] = False
              • Dialog - Hide Race_Choose_Dialog[(Player number of (Triggering player))] for (Triggering player)
              • Dialog - Clear Race_Choose_Dialog[(Player number of (Triggering player))]
              • Player - Make (Triggering player) treat Player 10 (Light Blue) as an Ally with shared vision
              • Player - Make Player 10 (Light Blue) treat (Triggering player) as an Ally with shared vision
              • Player - For (Triggering player), turn Alliance (non-aggression) On toward Player 10 (Light Blue)
              • Game - Display to (All players) the text: ((Name of (Triggering player)) + chose to side with the |cff32cd32Humans|r. He/She is now |cffff0000Hostile|r with the orcs.)
              • Dialog - Clear Class_Type_Dialog[(Player number of (Triggering player))]
              • Dialog - Create a dialog button for Class_Type_Dialog[(Player number of (Triggering player))] labelled Tank
              • Set Class_Type_Tank[(Player number of (Triggering player))] = (Last created dialog Button)
              • Dialog - Create a dialog button for Class_Type_Dialog[(Player number of (Triggering player))] labelled Damage
              • Set Class_Type_Damage[(Player number of (Triggering player))] = (Last created dialog Button)
              • Dialog - Create a dialog button for Class_Type_Dialog[(Player number of (Triggering player))] labelled Support
              • Set Class_Type_TankSupport[(Player number of (Triggering player))] = (Last created dialog Button)
              • Dialog - Change the title of Class_Type_Dialog[(Player number of (Triggering player))] to Class Type:
              • Dialog - Show Class_Type_Dialog[(Player number of (Triggering player))] for (Triggering player)
            • Else - Actions
Trigger (4/6)
  • dialog Choose class
    • Events
      • Dialog - A dialog button is clicked for Class_Type_Dialog[(Player number of Player 1 (Red))]
      • Dialog - A dialog button is clicked for Class_Type_Dialog[(Player number of Player 2 (Blue))]
      • Dialog - A dialog button is clicked for Class_Type_Dialog[(Player number of Player 3 (Teal))]
      • Dialog - A dialog button is clicked for Class_Type_Dialog[(Player number of Player 4 (Purple))]
      • Dialog - A dialog button is clicked for Class_Type_Dialog[(Player number of Player 5 (Yellow))]
      • Dialog - A dialog button is clicked for Class_Type_Dialog[(Player number of Player 6 (Orange))]
      • Dialog - A dialog button is clicked for Class_Type_Dialog[(Player number of Player 7 (Green))]
      • Dialog - A dialog button is clicked for Class_Type_Dialog[(Player number of Player 8 (Pink))]
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Class_Type_Damage[(Player number of (Triggering player))]
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerIsOrc[(Player number of (Triggering player))] Equal to True
            • Then - Actions
              • Dialog - Clear OrcClassPick[(Player number of (Triggering player))]
              • Dialog - Create a dialog button for OrcClassPick[(Player number of (Triggering player))] labelled Mage
              • Set OrcMage[(Player number of (Triggering player))] = (Last created dialog Button)
              • Dialog - Create a dialog button for OrcClassPick[(Player number of (Triggering player))] labelled Necromancer
              • Set OrcNecro[(Player number of (Triggering player))] = (Last created dialog Button)
              • Dialog - Create a dialog button for OrcClassPick[(Player number of (Triggering player))] labelled Spellflinger
              • Set OrcUndead_Spellflinger[(Player number of (Triggering player))] = (Last created dialog Button)
              • Dialog - Change the title of OrcClassPick[(Player number of (Triggering player))] to Damage
              • Dialog - Show OrcClassPick[(Player number of (Triggering player))] for (Triggering player)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PlayerIsOrc[(Player number of (Triggering player))] Equal to False
                • Then - Actions
                  • Dialog - Clear HumanClassPick[(Player number of (Triggering player))]
                  • Dialog - Create a dialog button for HumanClassPick[(Player number of (Triggering player))] labelled Mage
                  • Set HumanMage[(Player number of (Triggering player))] = (Last created dialog Button)
                  • Dialog - Create a dialog button for HumanClassPick[(Player number of (Triggering player))] labelled Necromancer
                  • Set Necromancer[(Player number of (Triggering player))] = (Last created dialog Button)
                  • Dialog - Create a dialog button for HumanClassPick[(Player number of (Triggering player))] labelled Spellflinger
                  • Set HumanUndead_Spellflinger[(Player number of (Triggering player))] = (Last created dialog Button)
                  • Dialog - Change the title of HumanClassPick[(Player number of (Triggering player))] to Damage
                  • Dialog - Show HumanClassPick[(Player number of (Triggering player))] for (Triggering player)
                • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Class_Type_Tank[(Player number of (Triggering player))]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PlayerIsOrc[(Player number of (Triggering player))] Equal to True
                • Then - Actions
                  • Dialog - Clear OrcClassPick[(Player number of (Triggering player))]
                  • Dialog - Create a dialog button for OrcClassPick[(Player number of (Triggering player))] labelled Warrior
                  • Set OrcWarrior[(Player number of (Triggering player))] = (Last created dialog Button)
                  • Dialog - Create a dialog button for OrcClassPick[(Player number of (Triggering player))] labelled Brewmaster
                  • Set OrcBrewmaster[(Player number of (Triggering player))] = (Last created dialog Button)
                  • Dialog - Change the title of OrcClassPick[(Player number of (Triggering player))] to Tank
                  • Dialog - Show OrcClassPick[(Player number of (Triggering player))] for (Triggering player)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • PlayerIsOrc[(Player number of (Triggering player))] Equal to False
                    • Then - Actions
                      • Dialog - Clear HumanClassPick[(Player number of (Triggering player))]
                      • Dialog - Create a dialog button for HumanClassPick[(Player number of (Triggering player))] labelled Warrior
                      • Set HumanWarrior[(Player number of (Triggering player))] = (Last created dialog Button)
                      • Dialog - Create a dialog button for HumanClassPick[(Player number of (Triggering player))] labelled Brewmaster
                      • Set HumanBrewmaster[(Player number of (Triggering player))] = (Last created dialog Button)
                      • Dialog - Change the title of HumanClassPick[(Player number of (Triggering player))] to Tank
                      • Dialog - Show HumanClassPick[(Player number of (Triggering player))] for (Triggering player)
                    • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Class_Type_TankSupport[(Player number of (Triggering player))]
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • PlayerIsOrc[(Player number of (Triggering player))] Equal to True
                    • Then - Actions
                      • Dialog - Clear OrcClassPick[(Player number of (Triggering player))]
                      • Dialog - Create a dialog button for OrcClassPick[(Player number of (Triggering player))] labelled Shaman
                      • Set OrcShaman[(Player number of (Triggering player))] = (Last created dialog Button)
                      • Dialog - Create a dialog button for OrcClassPick[(Player number of (Triggering player))] labelled Mistweaver
                      • Set OrcMistweaver[(Player number of (Triggering player))] = (Last created dialog Button)
                      • Dialog - Change the title of OrcClassPick[(Player number of (Triggering player))] to Support
                      • Dialog - Show OrcClassPick[(Player number of (Triggering player))] for (Triggering player)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • PlayerIsOrc[(Player number of (Triggering player))] Equal to False
                        • Then - Actions
                          • Dialog - Clear HumanClassPick[(Player number of (Triggering player))]
                          • Dialog - Create a dialog button for HumanClassPick[(Player number of (Triggering player))] labelled Shaman
                          • Set HumanShaman[(Player number of (Triggering player))] = (Last created dialog Button)
                          • Dialog - Create a dialog button for HumanClassPick[(Player number of (Triggering player))] labelled Mistweaver
                          • Set HumanMistweaver[(Player number of (Triggering player))] = (Last created dialog Button)
                          • Dialog - Change the title of HumanClassPick[(Player number of (Triggering player))] to Support
                          • Dialog - Show HumanClassPick[(Player number of (Triggering player))] for (Triggering player)
                        • Else - Actions
                • Else - Actions
Trigger (5/6)
  • Dialog Class Choose
    • Events
      • Dialog - A dialog button is clicked for HumanClassPick[(Player number of Player 1 (Red))]
      • Dialog - A dialog button is clicked for HumanClassPick[(Player number of Player 2 (Blue))]
      • Dialog - A dialog button is clicked for HumanClassPick[(Player number of Player 3 (Teal))]
      • Dialog - A dialog button is clicked for HumanClassPick[(Player number of Player 4 (Purple))]
      • Dialog - A dialog button is clicked for HumanClassPick[(Player number of Player 5 (Yellow))]
      • Dialog - A dialog button is clicked for HumanClassPick[(Player number of Player 6 (Orange))]
      • Dialog - A dialog button is clicked for HumanClassPick[(Player number of Player 7 (Green))]
      • Dialog - A dialog button is clicked for HumanClassPick[(Player number of Player 8 (Pink))]
    • Conditions
    • Actions
      • Dialog - Clear HumanClassPick[(Player number of (Triggering player))]
      • 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
              • (Unit-type of (Picked unit)) Equal to Lost Soul
              • (Owner of (Picked unit)) Equal to (Triggering player)
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to HumanMage[(Player number of (Triggering player))]
        • Then - Actions
          • Unit - Create 1 Human Mage for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
          • Player - Make Player 10 (Light Blue) treat (Owner of (Last created unit)) as an Ally
          • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to HumanWarrior[(Player number of (Triggering player))]
            • Then - Actions
              • Unit - Create 1 Human Warrior for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
              • Player - Make Player 10 (Light Blue) treat (Owner of (Last created unit)) as an Ally
              • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Necromancer[(Player number of (Triggering player))]
                • Then - Actions
                  • Unit - Create 1 Undead Necromancer for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
                  • Player - Make Player 10 (Light Blue) treat (Owner of (Last created unit)) as an Ally
                  • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Clicked dialog button) Equal to HumanShaman[(Player number of (Triggering player))]
                    • Then - Actions
                      • Unit - Create 1 Human Shaman for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
                      • Player - Make Player 10 (Light Blue) treat (Owner of (Last created unit)) as an Ally
                      • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Clicked dialog button) Equal to HumanUndead_Spellflinger[(Player number of (Triggering player))]
                        • Then - Actions
                          • Unit - Create 1 Undead Spellflinger for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
                          • Player - Make Player 10 (Light Blue) treat (Owner of (Last created unit)) as an Ally
                          • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Clicked dialog button) Equal to HumanMistweaver[(Player number of (Triggering player))]
                            • Then - Actions
                              • Unit - Create 1 Mistweaver for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
                              • Player - Make Player 10 (Light Blue) treat (Owner of (Last created unit)) as an Ally
                              • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Clicked dialog button) Equal to HumanBrewmaster[(Player number of (Triggering player))]
                                • Then - Actions
                                  • Unit - Create 1 Pandaren Brewmaster for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
                                  • Player - Make Player 10 (Light Blue) treat (Owner of (Last created unit)) as an Ally
                                  • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
                                • Else - Actions
Trigger 6/6
  • Dialog Class Choose Copy
    • Events
      • Dialog - A dialog button is clicked for OrcClassPick[(Player number of Player 1 (Red))]
      • Dialog - A dialog button is clicked for OrcClassPick[(Player number of Player 2 (Blue))]
      • Dialog - A dialog button is clicked for OrcClassPick[(Player number of Player 3 (Teal))]
      • Dialog - A dialog button is clicked for OrcClassPick[(Player number of Player 4 (Purple))]
      • Dialog - A dialog button is clicked for OrcClassPick[(Player number of Player 5 (Yellow))]
      • Dialog - A dialog button is clicked for OrcClassPick[(Player number of Player 6 (Orange))]
      • Dialog - A dialog button is clicked for OrcClassPick[(Player number of Player 7 (Green))]
      • Dialog - A dialog button is clicked for OrcClassPick[(Player number of Player 8 (Pink))]
    • Conditions
    • Actions
      • Dialog - Clear OrcClassPick[(Player number of (Triggering player))]
      • 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
              • (Unit-type of (Picked unit)) Equal to Lost Soul
              • (Owner of (Picked unit)) Equal to (Triggering player)
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to OrcMage[(Player number of (Triggering player))]
        • Then - Actions
          • Unit - Create 1 Orc Mage for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
          • Player - Make Player 11 (Dark Green) treat (Owner of (Last created unit)) as an Ally
          • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to OrcNecro[(Player number of (Triggering player))]
            • Then - Actions
              • Unit - Create 1 Undead Necromancer for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
              • Player - Make Player 11 (Dark Green) treat (Owner of (Last created unit)) as an Ally
              • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to OrcWarrior[(Player number of (Triggering player))]
                • Then - Actions
                  • Unit - Create 1 Orc Warrior for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
                  • Player - Make Player 11 (Dark Green) treat (Owner of (Last created unit)) as an Ally
                  • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Clicked dialog button) Equal to OrcShaman[(Player number of (Triggering player))]
                    • Then - Actions
                      • Unit - Create 1 Orc Shaman for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
                      • Player - Make Player 11 (Dark Green) treat (Owner of (Last created unit)) as an Ally
                      • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Clicked dialog button) Equal to OrcUndead_Spellflinger[(Player number of (Triggering player))]
                        • Then - Actions
                          • Unit - Create 1 Undead Spellflinger for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
                          • Player - Make Player 11 (Dark Green) treat (Owner of (Last created unit)) as an Ally
                          • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Clicked dialog button) Equal to OrcMistweaver[(Player number of (Triggering player))]
                            • Then - Actions
                              • Unit - Create 1 Mistweaver for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
                              • Player - Make Player 11 (Dark Green) treat (Owner of (Last created unit)) as an Ally
                              • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Clicked dialog button) Equal to OrcBrewmaster[(Player number of (Triggering player))]
                                • Then - Actions
                                  • Unit - Create 1 Pandaren Brewmaster for (Triggering player) at (Center of Lost Soul Spawn <gen>) facing Default building facing degrees
                                  • Player - Make Player 11 (Dark Green) treat (Owner of (Last created unit)) as an Ally
                                  • Set Hero_Pick[(Player number of (Triggering player))] = (Last created unit)
                                • Else - Actions
I know it's A LOT but it's such simple triggers, but my feeble mind can't comprehend the sheer amount to find the error.
 

Attachments

  • Trigger 1.png
    Trigger 1.png
    137 KB · Views: 110
  • Trigger 2.png
    Trigger 2.png
    131.2 KB · Views: 103
Last edited:
Level 27
Joined
Sep 26, 2009
Messages
2,474
Seems like you left out one trigger.
In your first trigger you set Hero Description dialog and "Yes" "No" buttons. To that dialog only second trigger is related, but that second trigger fires if you press "No" button only.
So what happens if you press "Yes"?

I also don't think you need to index dialog buttons, imo, because they are same for every player (you would need to make it array if each player had different text in dialog buttons, etc.)

You also incorrectly use If/Then/Else action. It's probably not the cause for problems, but so far, the only race you can associate with is either human or orc.
In that case, using
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerIsOrc[(Player number of (Triggering player))] Equal to True
    • Then - Actions
      • -------- actions for orcs --------
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerIsOrc[(Player number of (Triggering player))] Equal to False
        • Then - Actions
          • -------- actions for humans --------
        • Else - Actions
this is not needed. You can easily use 1 ITE action like this:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • AnBeam_Prolong[(Player number of (Triggering player))] Equal to True
    • Then - Actions
      • -------- actions for orcs --------
    • Else - Actions
      • -------- actions for humans --------
because if player is not Orc, then he must obviously be human. He can't be something else.

Also, in your later triggers, why don't you simply swap conditions in your ITEs to check first if player is Orc or not and then you check what type of class he even is.

Also, can you show more than 1 dialog at a time? (not dialog buttons, but dialog) Because in your first trigger, you show dialog. In your second trigger you show another dialog and after that you hide the first one.


Edit: Does this create mage for you even when you select different class role (e.g. when you select tank)?
 
Level 2
Joined
Jun 19, 2010
Messages
6
Seems like you left out one trigger.
In your first trigger you set Hero Description dialog and "Yes" "No" buttons. To that dialog only second trigger is related, but that second trigger fires if you press "No" button only.
So what happens if you press "Yes"?

I also don't think you need to index dialog buttons, imo, because they are same for every player (you would need to make it array if each player had different text in dialog buttons, etc.)

You also incorrectly use If/Then/Else action. It's probably not the cause for problems, but so far, the only race you can associate with is either human or orc.
In that case, using
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerIsOrc[(Player number of (Triggering player))] Equal to True
    • Then - Actions
      • -------- actions for orcs --------
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerIsOrc[(Player number of (Triggering player))] Equal to False
        • Then - Actions
          • -------- actions for humans --------
        • Else - Actions
this is not needed. You can easily use 1 ITE action like this:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • AnBeam_Prolong[(Player number of (Triggering player))] Equal to True
    • Then - Actions
      • -------- actions for orcs --------
    • Else - Actions
      • -------- actions for humans --------
because if player is not Orc, then he must obviously be human. He can't be something else.

Also, in your later triggers, why don't you simply swap conditions in your ITEs to check first if player is Orc or not and then you check what type of class he even is.

Also, can you show more than 1 dialog at a time? (not dialog buttons, but dialog) Because in your first trigger, you show dialog. In your second trigger you show another dialog and after that you hide the first one.


Edit: Does this create mage for you even when you select different class role (e.g. when you select tank)?

I didn't post the "yes" trigger to the hero descriptions because it is irrelevant to what I am trying to solve. I understand what you mean about the person must be orc, but I was just trying to make everything fit because of the problem I am having. I really appreciate you helping me streamline my triggers, but that is not the sort of help i'm looking for. And yes, whenever I select a different class role, for example Tank, and choose let's say warrior, it will still create a mage for me.

Remember to please stay on topic guys, i'm not looking for help about storing information into variables to help make more streamlined, as I already done all the work. I am just trying to find out why it ALWAYS creates a mage no matter what class or class type I choose.
 
i'm not looking for help about storing information into variables to help make more streamlined, as I already done all the work. I am just trying to find out why it ALWAYS creates a mage no matter what class or class type I choose.

that is a costly mistake. Everything should be efficient otherwise u will notice the game lag. u also leak locations.

As for ur problem tho
u can really simplify this instead of creating a dialog for every player just make a dialog and display it to everyone then when someone click the dialog. show the next dialog for that player. ur buttons may be getting messed up somewere. U can try using display messages to see what is what.
 
Level 2
Joined
Jun 19, 2010
Messages
6
that is a costly mistake. Everything should be efficient otherwise u will notice the game lag.

Once again, I am not here to make my game less laggy or streamlined. I am trying to get help on why it always creates a mage whenever I choose a hero regardless of type or class.

EDIT: Last time I tried creating a single dialog and displaying it to all players, it always glitched out, can you please show me the proper format on how to do this if you don't mind?
 
yup ill do it after im done eating lol.

Edit: starting to make it in about 2 minutes.

Edit 2: here ya go this is all done. press esc to display the first dialog. Then click the dialogs to see the different options.
it wont create units i didnt add that to it. it will show what u have selected tho by a message. All u have to do to get this to work for ur map is copy the triggers over. Then put the units were i have the text create unit here just match the unit with the name. if u need this altered and cant figure it out feel free to ask and ill help u. This is efficient and leak free.
Also u only need 3 triggers for this to work for everyone.
 

Attachments

  • Dialog example for Chowder.w3x
    15.2 KB · Views: 54
Last edited:
Status
Not open for further replies.
Top