Triggers - Dialogs

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
Basics of a Dialog
by ragingspeedhorn & Orc_Tamer

*Users on World Editor Tutorial Site Go Here For Better View

Note: In this tutorial we will show you how you create a simple multiply choice dialog for 1 player. Keep in mind that this is directed towards the beginners within the Trigger Editor and is in no way meant to teach the experienced modders anything that they probably didn't knew already.



1) What is a dialog?

A "Dialog" is a little window that pops up which contains some buttons that you can click. An example of what a Dialog can be used for is a simple thing like if you would like to have a 100 gold. Instead of having the choice based on chat commands where you write -yes or -no it is (and looks) better to have a Dialog window appearing asking you if you would like to have a 100 gold and then having 2 buttons which says "Yes" or "No". We will now show you how you make a Dialog like I just told you about in the simpliest way (that we know of).


2) Getting Started.

To get started you should (of course) open up the World Editor and enter the Trigger Editor (Hotkey for it is F4), the icon for it is located in between the Terrain Editor & the Sound Editor.

triggereditorpic9kp.jpg



3) Creating The Variables.

Once you entered the Trigger Editor the first thing to do is finding the Variable Editor (Hotkey for it is Ctrl+B), the icon for it is located to the left of the New Category icon.



When you are inside the Variable Editor you click on the green x with a + in front of it
greenx5yy.jpg
to create a new variable, then you make the two variables needed for the Dialog as shown below.

2variables3zt.jpg



4) Creating The Dialog Window.

Once you made your two variables you can start with the actual triggers for getting the Dialog Window to appear.

First you create a new trigger and do as shown below.

Dialog.png


Once this is done the Dialog will appear perfectly but there will be no effect when clicking the buttons.


5) Creating The Buttons.

To make the buttons actually do something you create two triggers as shown below.

Dialog2-1.gif


Dialog3-1.gif


Once these two triggers have been made your Dialog should work and look like shown below.

finaldialog0bw.jpg
 
L

lascha

Guest
:D cool, very nice, always wanted to know how to do that ^_^
Though in many games when that kind of dialog shows up, you won't be able to see what the other people are typing
 

Rinpun

Ex TH Member
Reaction score
105
Yo, get rid of the ugly centering before I do it for you :p

(Centering is hard to read in comparison with left flush.)

Other than that, good tutorial :)
 

ragingspeedhorn

Is a Banned Asshole
Reaction score
94
Rinpun said:
Yo, get rid of the ugly centering before I do it for you :p

(Centering is hard to read in comparison with left flush.)

Other than that, good tutorial :)

Thanks a bunch and yes centering is annoying, I do not know why Orc_Tamer did it :p
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Short but very detalied. Like it. Didnt know how to make dialogs before:D

Rep.
 

Battlemapsta

I am the Conduit of Change
Reaction score
101
Same here this is the first time I ever learned dialog. Thanks Orc Tamer and very well executed tutorial.
 
E

Eilhal

Guest
I figured this out from an outside tut a while ago... I wish I would have found yours... much better organized :p
 

MrApples

Ultra Cool Member
Reaction score
78
What about the advanced dialog part? Such as in Swat: Aftermath the enter code dialog.
 
P

pityme

Guest
Badly need help coz i don really understand T.T


this is gona be my very 1st trigger practice(i jz started).

ok as of the triggers :-


The Dialog Window
Events
Time - Elapsed game time is 1.00 seconds
Conditions
None
Actions
Dialog - Clear MyDialog
Dialog - Change the title of MyDialog to Do you want a 100 gold?
Dialog - Create a dialog button for MyDialog labelled Yes
Set DialogButton[1] = (Last created dialog Button)
Dialog - Create a dialog button for MyDialog labelled No
Set DialogButton[2] = (Last created dialog Button)
Dialog - Show MyDialog for Player 1 (Red)

From what i can easily understand from the instruction, i shud create new EVent by clicking it, n choose Time - Elapsed game time n edit it to 1 sec.

same goes to Actions>dialog>clear my dialog.

How do i do this Set Dialogbutton[1]?= (Last created dialog Button)

i dont know what i shud do to execute this part in my trigger editor. Is this also smth i need to create? or jz a reminder or?

because i cant continue to :-

Yes Button
Events
Dialog - A dialog button is clicked for MyDialog
Conditions
(Clicked dialog button) Equal to DialogButton[1]
Actions
Player - Add 100 to Player 1 (Red) Current gold
Game - Display to Player Group - Player 1 (Red) the text: You have recieved 100 gold

because i cant make the Conditions (maybe because of the created button thingy?)
 
L

Letian

Guest
It may be better to add this sentence

The help information is great!
But I am puzzling for a while with how to set variable when I see
" Set DialogButton[1] = (Last created dialog Button)" .
It may be better like this " All - Set variable - Set DialogButton[1] = (Last created dialog Button)"
for new men :)
 

BioDiablo

New Member
Reaction score
0
I would like to know how to make a dialog that is based on percentage. For example:
Dialog with Title "Choose game mode"
First button "Random"
Second button "Manual"

==========================

I know how to make that kind of dialog.. problem is that, if I show it, then I show it to player one(red), but it isn't fair cause some might want to choose random and some manual. So, how can I make it, that, when voting is done, to run manual or random game depending on people vote?
 
M

MysterySoul

Guest
This is a great tutorial for Basic Dialog. <3
Do you have an advanced Dialog tutorial alswe?? :p
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
Update - Added New User Friendly GUI Version
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top