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

How to make a Working Dialog

Level 14
Joined
Jan 5, 2009
Messages
1,127

Dialogs

What are they:
They are 'menus' with buttons that have different options.
Dialogs are created using GUI
What you need:
-Some GUI skill
-Some Variables
====================
Create these variables.
DialogButton
-Array? Yes. What number? The amount of Buttons you want
Dialog1
-Array? No
=====================
Ok Heres our triggers. First Setup.
This is where the player chooses from the buttons we will create.
  • Dialog Setup
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • -------- Buttons --------
      • Dialog - Create a dialog button for Dialog1 labelled Naga
      • Set DialogButtons[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog1 labelled Human
      • Set DialogButtons[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog1 labelled Demons
      • Set DialogButtons[3] = (Last created dialog Button)
      • -------- Show --------
      • Dialog - Change the title of Dialog1 to What race do like t...
      • Player Group - Pick every player in (All players) and do (Dialog - Show Dialog1 for (Picked player))
Warning: Always create the dialog buttons before showing it to the players.
Now in my dialog the effects are:
  • ButtonOne
    • Events
      • Dialog - A dialog button is clicked for Dialog1
    • Conditions
      • (Clicked dialog button) Equal to DialogButtons[1]
    • Actions
      • Game - Display to (All players matching ((Matching player) Equal to (Triggering player))) for 20.00 seconds the text: You luv Naga!!!
  • ButtonTwo
    • Events
      • Dialog - A dialog button is clicked for Dialog1
    • Conditions
      • (Clicked dialog button) Equal to DialogButtons[2]
    • Actions
      • Game - Display to (All players matching ((Matching player) Equal to (Triggering player))) for 20.00 seconds the text: You luv Humans!!!
  • ButtonThree
    • Events
      • Dialog - A dialog button is clicked for Dialog1
    • Conditions
      • (Clicked dialog button) Equal to DialogButtons[3]
    • Actions
      • Game - Display to (All players matching ((Matching player) Equal to (Triggering player))) for 20.00 seconds the text: You luv Demons!!!
You see in my effects all that happens is a text message comes up. But when you make yours, if the 'hero' gets it wrong they turn into a sheep, ect...
Hope this helps!!!
 
Last edited:
Top