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

Basics of a Dialog

Orc_Tamer

O

Orc_Tamer

Basics of a Dialog

by ragingspeedhorn & Orc_Tamer


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 litle 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 apearing 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 (ofcourse) open up the World Editor and enter the Trigger Editor (Hotkey for it is F4), the icon for it is located inbetween 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 + infront of it
greenx5yy.png
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 apear.

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

  • 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)
Once this is done the Dialog will apear 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.

  • 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
  • No Button
    • Events
      • Dialog - A dialog button is clicked for MyDialog
    • Conditions
      • (Clicked dialog button) Equal to DialogButton[2]
    • Actions
      • Game - Display to Player Group - Player 1 (Red) the text: You didn't want any gold
Once these two triggers have been made your Dialog should work and look like shown below.

finaldialog0bw.jpg
 
Last edited by a moderator:
Level 32
Joined
Oct 23, 2006
Messages
5,291
Tutorial Moved

Orc_Tamer; sorry m8 I had to move ths tut back to » Tutorial Submission « because of the provision:
All image files must be attached to your post. We don't wish to be dependent on other sites (To avoid situations in which the server on which the images have been saved falls, damaging the tutorial).

The images need to be physically attached to the post so that they are not dependant upon imageshack.

Thanks.
 
Level 5
Joined
Jan 5, 2007
Messages
40
Orc_Tamer; sorry m8 I had to move ths tut back to » Tutorial Submission « because of the provision:


The images need to be physically attached to the post so that they are not dependant upon imageshack.

Thanks.

Well... I can't attach them since I can't edit that tutorial. For some reason my ol d tutorials are submitted by a guest named liked me.
 
Level 32
Joined
Oct 23, 2006
Messages
5,291
Bloody Bug

I will deal with it for you guys.

[off-topic] What happened to your waykewl hackbot Orc_Tamer?

*edit* There is a BIG problem with this thread! I can't edit that tutorial either!

Orc_Tamer: I will cnp the post and send it to you in a PM. You can then cnp the thing right back into a brand new thread and we'll go from there.
 
Last edited:
Level 5
Joined
Jan 5, 2007
Messages
40
I will deal with it for you guys.

[off-topic] What happened to your waykewl hackbot Orc_Tamer?

*edit* There is a BIG problem with this thread! I can't edit that tutorial either!

Orc_Tamer: I will cnp the post and send it to you in a PM. You can then cnp the thing right back into a brand new thread and we'll go from there.

[off-topic] Its there just the link..[/off-topic]

I will make the new thread..

-Orc_Tamer
 
Top