• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Dialog + buttons linking

Status
Not open for further replies.
Level 7
Joined
Dec 8, 2008
Messages
243
My current dialog series is the same as this
HTML:
http://world-editor-tutorials.thehelper.net/dialogs.php
Very sorry I can't paste it here right now, it's just I'm at college. Anyway, my old dialog button series used to have some 105+ variables linking a series of choices like:

choose hero:

A
B
C
D
Next page->

E
F
G
H
<- Previous page

...After I saw the guide using variables with arrays I started over, but I still can't go from A (choose hero dialog) to B (describe hero) to A (Choose hero dialog) to C (example: describe a different hero dialog), ect.

I'd intended on making it so when I click on a hero, it would display it's stats and such (ofc, just me writing it out), this worked fine, but what didn't work was choosing to go back to page 1, which would display all the heroes again.

Anyway, I was wondering if anyone could suggest a working series of dialog/button triggers so I can go back and forth.
 
Level 7
Joined
Dec 8, 2008
Messages
243
Trigger underneith doesnt' seem all that neccasary, so, once I get this working, I'll probably delete it whether I need it or not.
  • creating heroes
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Heroes[1] = Paladin
      • Set Heroes[2] = Dark Mistress
      • Set Heroes[3] = Blue Mage
      • Set Heroes[4] = No unit-type
      • Set Heroes[5] = No unit-type
      • Set Heroes[6] = No unit-type
      • Set Heroes[7] = No unit-type
      • Set Heroes[8] = No unit-type
      • Set Heroes[9] = No unit-type
      • Set Heroes[10] = No unit-type
      • Set Heroes[11] = No unit-type
      • Set Heroes[12] = No unit-type
      • Set Heroes[13] = No unit-type
Trigger below I made because after reviewing yours, Maker; I noticed you had one similar to this which instantly redirected the user to the next trigger (although come to think of it, I don't think it works, nor is it neccasary)

  • Part 1 instantly trigger number 2
    • Events
      • Time - Elapsed game time is 0.75 seconds
    • Conditions
    • Actions
      • Dialog - Create a dialog button for Return labelled proceed
Trigger below... I don't even know anymore.

  • Part 2 Hero Descriptions
    • Events
      • Time - Elapsed game time is 0.80 seconds
    • Conditions
    • Actions
      • Dialog - Clear Choose_Hero_Dialog
      • Dialog - Change the title of Choose_Hero_Dialog to Choose your desired...
      • -------- DIALOG 1 --------
      • -------- PALADIN --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Paladin
      • Set Choose_Hero_Dialog_Button[1] = (Last created dialog Button)
      • -------- DARK MISTRESS --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Dark Mistress
      • Set Choose_Hero_Dialog_Button[2] = (Last created dialog Button)
      • -------- TIME MAGE --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Blue Mage
      • Set Choose_Hero_Dialog_Button[3] = (Last created dialog Button)
      • -------- ALCHEMIST --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Alchemist
      • Set Choose_Hero_Dialog_Button[4] = (Last created dialog Button)
      • -------- ARCHER --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Archer
      • Set Choose_Hero_Dialog_Button[5] = (Last created dialog Button)
      • -------- BARD --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Bard
      • Set Choose_Hero_Dialog_Button[6] = (Last created dialog Button)
      • -------- BERSERKER --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Berserker
      • Set Choose_Hero_Dialog_Button[7] = (Last created dialog Button)
      • -------- BLACK MAGE --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Black Mage
      • Set Choose_Hero_Dialog_Button[8] = (Last created dialog Button)
      • -------- DRAGOON --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Dragoon
      • Set Choose_Hero_Dialog_Button[9] = (Last created dialog Button)
      • -------- GAMBLER --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Gambler
      • Set Choose_Hero_Dialog_Button[10] = (Last created dialog Button)
      • -------- PAGE 2 --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Page 2
      • Set Choose_Hero_Dialog_Button[11] = (Last created dialog Button)
      • -------- ------------------------------------------------------------------------------------------------------- --------
      • -------- DIALOG 2 --------
      • Dialog - Clear Choose_Hero_Dialog2
      • Dialog - Change the title of Choose_Hero_Dialog2 to Choose your desired...
      • -------- ------------------------------------------------------------------------------------------------------- --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Gunner
      • Set Choose_Hero_Dialog_Button[12] = (Last created dialog Button)
      • -------- PAGE 1 --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog2 labelled Page 1
      • Set Choose_Hero_Dialog_Button[13] = (Last created dialog Button)
      • -------- ------------------------------------------------------------------------------------------------------- --------
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Dialog - Show Choose_Hero_Dialog for (Picked player)


  • Part 3 Looping Main Buttons
    • Events
      • Dialog - A dialog button is clicked for Choose_Hero_Dialog
      • Dialog - A dialog button is clicked for Choose_Hero_Dialog2
      • Dialog - A dialog button is clicked for Return
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Choose_Hero_Dialog_Button[11]
        • Then - Actions
          • Dialog - Change the title of Choose_Hero_Dialog2 to Page 2
          • Dialog - Show Choose_Hero_Dialog2 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 Choose_Hero_Dialog_Button[13]
        • Then - Actions
          • Dialog - Change the title of Choose_Hero_Dialog to Page 1
          • Dialog - Show Choose_Hero_Dialog for (Triggering player)
          • Skip remaining actions
        • Else - Actions
      • -------- Create the chosen hero --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Choose_Hero_Dialog_Button[1]
        • Then - Actions
          • Dialog - Change the title of Describe_Paladin to Paladin. Ethical...
          • -------- PALADIN --------
          • Dialog - Create a dialog button for Describe_Paladin labelled Choose this hero
          • Set Choose_Hero_Dialog_Button[14] = (Last created dialog Button)
          • Dialog - Create a dialog button for Describe_Paladin labelled Return
          • Set Choose_Hero_Dialog_Button[24] = (Last created dialog Button)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Choose_Hero_Dialog_Button[14]
            • Then - Actions
              • Unit - Create 1 Heroes[1] for (Triggering player) at (Center of Choose Alignment <gen>) facing Default building facing degrees
              • Selection - Select (Last created unit) for (Picked player)
            • Else - Actions
          • Skip remaining actions
        • Else - Actions
So, as you might have seen, I've only been working on fixing 1 class at a time...any suggestions?
 
Level 7
Joined
Dec 8, 2008
Messages
243
Yeah but that triggers not needed. I'll be using this instead. The following WORKS, but ofc, I can't click the return button to repick. Any suggestions?

  • Part 1 Hero Descriptions
    • Events
      • Time - Elapsed game time is 0.80 seconds
    • Conditions
    • Actions
      • Dialog - Clear Choose_Hero_Dialog
      • Dialog - Change the title of Choose_Hero_Dialog to Choose your desired...
      • -------- DIALOG 1 --------
      • -------- PALADIN --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Paladin
      • Set Choose_Hero_Dialog_Button[1] = (Last created dialog Button)
      • -------- DARK MISTRESS --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Dark Mistress
      • Set Choose_Hero_Dialog_Button[2] = (Last created dialog Button)
      • -------- BLUE MAGE --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Blue Mage
      • Set Choose_Hero_Dialog_Button[3] = (Last created dialog Button)
      • -------- ALCHEMIST --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Alchemist
      • Set Choose_Hero_Dialog_Button[4] = (Last created dialog Button)
      • -------- ARCHER --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Archer
      • Set Choose_Hero_Dialog_Button[5] = (Last created dialog Button)
      • -------- BARD --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Bard
      • Set Choose_Hero_Dialog_Button[6] = (Last created dialog Button)
      • -------- BERSERKER --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Berserker
      • Set Choose_Hero_Dialog_Button[7] = (Last created dialog Button)
      • -------- BLACK MAGE --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Black Mage
      • Set Choose_Hero_Dialog_Button[8] = (Last created dialog Button)
      • -------- DRAGOON --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Dragoon
      • Set Choose_Hero_Dialog_Button[9] = (Last created dialog Button)
      • -------- GAMBLER --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Gambler
      • Set Choose_Hero_Dialog_Button[10] = (Last created dialog Button)
      • -------- PAGE 2 --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Page 2
      • Set Choose_Hero_Dialog_Button[11] = (Last created dialog Button)
      • -------- ------------------------------------------------------------------------------------------------------- --------
      • -------- DIALOG 2 --------
      • Dialog - Clear Choose_Hero_Dialog2
      • Dialog - Change the title of Choose_Hero_Dialog2 to Choose your desired...
      • -------- ------------------------------------------------------------------------------------------------------- --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog labelled Gunner
      • Set Choose_Hero_Dialog_Button[12] = (Last created dialog Button)
      • -------- PAGE 1 --------
      • Dialog - Create a dialog button for Choose_Hero_Dialog2 labelled Page 1
      • Set Choose_Hero_Dialog_Button[13] = (Last created dialog Button)
      • -------- ------------------------------------------------------------------------------------------------------- --------
      • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
        • Loop - Actions
          • Dialog - Show Choose_Hero_Dialog for (Picked player)
  • Part 2 Looping Main Buttons
    • Events
      • Dialog - A dialog button is clicked for Choose_Hero_Dialog
      • Dialog - A dialog button is clicked for Choose_Hero_Dialog2
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Choose_Hero_Dialog_Button[11]
        • Then - Actions
          • Dialog - Change the title of Choose_Hero_Dialog2 to Page 2
          • Dialog - Show Choose_Hero_Dialog2 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 Choose_Hero_Dialog_Button[13]
        • Then - Actions
          • Dialog - Change the title of Choose_Hero_Dialog to Page 1
          • Dialog - Show Choose_Hero_Dialog for (Triggering player)
          • Skip remaining actions
        • Else - Actions
      • -------- Create the chosen hero --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Choose_Hero_Dialog_Button[1]
        • Then - Actions
          • Dialog - Change the title of Describe_Paladin to Paladin. Ethical...
          • -------- PALADIN --------
          • Dialog - Create a dialog button for Describe_Paladin labelled Choose this hero
          • Set Choose_Hero_Dialog_Button[14] = (Last created dialog Button)
          • Dialog - Create a dialog button for Describe_Paladin labelled Return
          • Set Choose_Hero_Dialog_Button[24] = (Last created dialog Button)
          • Dialog - Show Describe_Paladin 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 Choose_Hero_Dialog_Button[24]
            • Then - Actions
              • Dialog - Show Choose_Hero_Dialog for (Triggering player)
            • Else - Actions
  • Create Paladin
    • Events
      • Dialog - A dialog button is clicked for Describe_Paladin
    • Conditions
      • (Clicked dialog button) Equal to Choose_Hero_Dialog_Button[14]
    • Actions
      • Set Choose_Hero_Dialog_Button[14] = (Clicked dialog button)
      • Unit - Create 1 Paladin for (Triggering player) at (Center of Choose Alignment <gen>) facing Default building facing degrees
      • Selection - Select (Last created unit) for (Owner of (Triggering unit))
So, yeah.

  • Dialog - Create a dialog button for Describe_Paladin labelled Return
    • Set Choose_Hero_Dialog_Button[24] = (Last created dialog Button)
Could I make it so you can only get to the main page if you first click a different button which also uses Choose hero dialog button [24]? That way I can make a working link by making a condition saying that to first get to the main link you have to click choose hero dialog button 24 and in events It'l say you have to have clicked the button "return" to get to the main... series of hero choices.

-sigh- I'll go try this out. It's been giving me a headache for nearly 3 days now. :(
 
Status
Not open for further replies.
Top