• 🏆 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!

Swicth To another dialog

Status
Not open for further replies.
Level 5
Joined
Nov 6, 2008
Messages
150
Hi im trying to make a dialog where you first being asking yes/no
and then if you answar yes then there come another dialog where you chose how meny monster you will summon.
Just give me the trigger how i switch between the dialogs?
thats all i need(= plz
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Err... it's pretty easy ^^
You just need to show the other dialog when you click a button


Setup dialogs


  • Init Dialogs
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • -------- DIALOG 1 --------
      • Dialog - Change the title of Dialog1 to Dialog 1
      • Dialog - Create a dialog button for Dialog1 labelled Change Dialog
      • Set D_Button[1] = (Last created dialog Button)
      • -------- DIALOG 2 --------
      • Dialog - Change the title of Dialog2 to Dialog 2
      • Dialog - Create a dialog button for Dialog2 labelled Option 1
      • Set D_Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog2 labelled Option 2
      • Set D_Button[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog2 labelled Option 3
      • Set D_Button[4] = (Last created dialog Button)

Buttons Clicked


  • Button Clicked
    • Events
      • Dialog - A dialog button is clicked for Dialog1
      • Dialog - A dialog button is clicked for Dialog2
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to D_Button[1]
        • Then - Actions
          • Dialog - Show Dialog2 for Player 1 (Red)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to D_Button[2]
            • Then - Actions
              • Do - option 1
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to D_Button[3]
                • Then - Actions
                  • Do - option 2
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Clicked dialog button) Equal to D_Button[4]
                    • Then - Actions
                      • Do - option 3
                    • Else - Actions
So... when you click the button in Dialog 1, it will change to dialog 2
If you click on the button in the second dialog, it does something (yes, put them inside the same trigger... it's more efficient).

Anyway, here's a map that kind of uses the same system (perhaps you could call it a bit more "advanced", but whatever)
I'm still working on the attached map, so do not copy/take anything without my permission ^^
 

Attachments

  • Commando Wars Redone.w3x
    176.7 KB · Views: 51
Last edited:
Level 5
Joined
Nov 6, 2008
Messages
150
Thank you i just forgot that one anyway thank you alot man(=
Edit the buttom clicked trigger do me a litter bit confused.
Mebey because i use another sytem then you.:grin:
i'll send you a demo
 

Attachments

  • test.w3m
    18.3 KB · Views: 55
Level 28
Joined
Jan 26, 2007
Messages
4,789
Here is the problem:

  • How Many Then panda
    • Events
    • Conditions
    • Actions
      • Dialog - Clear PandaSummon
      • Dialog - Change the title of PandaSummon to How many then?
      • Dialog - Create a dialog button for PandaSummon labelled 1
      • Dialog - Create a dialog button for PandaSummon labelled 10
      • Dialog - Create a dialog button for PandaSummon labelled 20
      • Dialog - Create a dialog button for PandaSummon labelled 30
      • Dialog - Create a dialog button for PandaSummon labelled 40
      • Dialog - Create a dialog button for PandaSummon labelled 50
      • Set Summon1 = (Last created dialog Button)
      • Set Summon10 = (Last created dialog Button)
      • Set Summon20 = (Last created dialog Button)
      • Set Summon30 = (Last created dialog Button)
      • Set Summon40 = (Last created dialog Button)
      • Set Summon50 = (Last created dialog Button)
      • Dialog - Show PandaSummon for (Owner of (Entering unit))
You set all dialog button variables to the same dialog button ("50"), after every "Dialog - Create a dialog button for Dialog labelled label", you should use a "Set DialogButton[X] = (Last created dialog Button)", if you set the variables at the end, it will
On top of that, this is pretty inefficient, since you have to use a lot of variables/triggers for it.

I really suggest you do it like in the example I have given you.
(I'll edit the example right away, with more dialog buttons, so you can see it for yourself).
 
Last edited:
Status
Not open for further replies.
Top