• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] My first trigger

Status
Not open for further replies.
Level 9
Joined
Aug 18, 2008
Messages
345
I am very new to triggers, this is my first real attempt to start learning. However something went badly wrong at my first attempt. Please do not link Jass coding, I have a hard time as it is with the GUI (its called that right?) and I don't really care if it leaks as long as I learn something.
Now where is it I fail in this trigger? Because it does not create a hero like it is supposed to. :sad:


  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Diffrent Races --------
      • Set Races[1] = Orc Leader
      • Set Races[2] = No unit-type
      • Set Races[3] = Eagle Commando
      • Set Races[4] = No unit-type
      • Set Races[5] = Storm Crow Emissary
      • Set Races[6] = No unit-type
  • My Dialog
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • -------- ---- Dialog Races ---- --------
      • Dialog - Clear HeroDialog1
      • Dialog - Change the title of HeroDialog1 to Pick Your Race 1/3
      • Dialog - Create a dialog button for HeroDialog1 labelled Crow
      • Set DialogButtons[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for HeroDialog1 labelled Next page
      • Set DialogButtons[2] = (Last created dialog Button)
      • -------- ----- Page 2 ----- --------
      • Dialog - Create a dialog button for HeroDialog2 labelled Eagle
      • Set DialogButtons[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for HeroDialog2 labelled Next page
      • Set DialogButtons[4] = (Last created dialog Button)
      • -------- ----- Page 3 ----- --------
      • Dialog - Create a dialog button for HeroDialog3 labelled Storm Crow
      • Set DialogButtons[5] = (Last created dialog Button)
      • Dialog - Create a dialog button for HeroDialog3 labelled Next page
      • Set DialogButtons[6] = (Last created dialog Button)
      • -------- Showing the dialog to all players --------
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Dialog - Show HeroDialog1 for (Picked player)

  • Races
    • Events
      • Dialog - A dialog button is clicked for HeroDialog1
      • Dialog - A dialog button is clicked for HeroDialog2
      • Dialog - A dialog button is clicked for HeroDialog3
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButtons[2]
        • Then - Actions
          • Dialog - Change the title of HeroDialog2 to Pick Your Race 2/3
          • Dialog - Show HeroDialog2 for (Triggering player)
          • Skip remaining actions
        • Else - Actions
          • -------- Switch to page 3 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to DialogButtons[4]
            • Then - Actions
              • Dialog - Change the title of HeroDialog3 to Pick Your Race 3/3
              • Dialog - Show HeroDialog3 for (Triggering player)
              • Skip remaining actions
            • Else - Actions
              • -------- Switch to page 1 --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to DialogButtons[6]
                • Then - Actions
                  • Dialog - Change the title of HeroDialog1 to Pick Your Race 1/3
                  • Dialog - Show HeroDialog1 for (Triggering player)
                  • Skip remaining actions
                • Else - Actions
                  • -------- Create the chosen Race --------
                  • 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
                      • (Clicked dialog button) Equal to DialogButtons[(Integer A)]
                    • Then - Actions
                      • Unit - Create 1 Races[(Integer A)] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
                      • Selection - Select (Last created unit) for (Triggering player)
                      • Game - Display to (Player group((Triggering player))) the text: (Name of (Last created unit))
                    • Else - Actions
Thanks for helping out guys
 
Status
Not open for further replies.
Top