Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Come and join our gamer community by
registering for free here
Other Gaming Forum
PC games
Warcraft Tools and Tutorials
Basics of a Dialog
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ragingspeedhorn" data-source="post: 125240" data-attributes="member: 5868"><p><span style="font-size: 26px"><strong><span style="font-size: 15px">Basics of a Dialog</span></strong></span></p><p><em>by ragingspeedhorn & Orc_Tamer</em></p><p> </p><p><u>Note:</u> In this tutorial we will show you how you create a <em>simple</em> 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.</p><p> </p><p><span style="font-size: 15px">1) What is a dialog?</span></p><p>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". </p><p>We will now show you how you make a Dialog like I just told you about in the simpliest way (that we know of).</p><p> </p><p><span style="font-size: 15px">2) Getting Started.</span></p><p>To get started you should (ofcourse) open up the World Editor and enter the Trigger Editor (Hotkey for it is <strong>F4</strong>), the icon for it is located inbetween the Terrain Editor & the Sound Editor.</p><p><img src="http://img230.imageshack.us/img230/5782/triggereditorpic9kp.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p> </p><p><span style="font-size: 15px">3) Creating The Variables.</span></p><p>Once you entered the Trigger Editor the first thing to do is finding the Variable Editor (Hotkey for it is <strong>Ctrl+B</strong>), the icon for it is located to the left of the New Category icon.</p><p><img src="http://img230.imageshack.us/img230/3640/variableeditorpic2rn.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>When you are inside the Variable Editor you click on the green x with a + infront of it <img src="http://img81.imageshack.us/img81/647/greenx5yy.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> to create a new variable, then you make the two variables needed for the Dialog as shown below.</p><p><img src="http://img208.imageshack.us/img208/1166/2variables3zt.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p> </p><p><span style="font-size: 15px">4) Creating The Dialog Window.</span></p><p>Once you made your two variables you can start with the actual triggers for getting the Dialog Window to apear.</p><p>First you create a new trigger and do as shown below.</p><p> </p><p><u>The Dialog Window</u></p><p>[code] </p><p> Events</p><p> Time - Elapsed game time is 1.00 seconds</p><p> Conditions</p><p> None</p><p> Actions</p><p> Dialog - Clear MyDialog</p><p> Dialog - Change the title of MyDialog to Do you want a 100 gold?</p><p> Dialog - Create a dialog button for MyDialog labelled Yes</p><p> Set DialogButton[1] = (Last created dialog Button)</p><p> Dialog - Create a dialog button for MyDialog labelled No</p><p> Set DialogButton[2] = (Last created dialog Button)</p><p> Dialog - Show MyDialog for Player 1 (Red)[/code]</p><p>Once this is done the Dialog will apear perfectly but there will be no effect when clicking the buttons.</p><p> </p><p><span style="font-size: 15px">5) Creating The Buttons.</span></p><p>To make the buttons actually do something you create two triggers as shown below.</p><p> </p><p><u>Yes Button</u></p><p>[code] Events</p><p> Dialog - A dialog button is clicked for MyDialog</p><p> Conditions</p><p> (Clicked dialog button) Equal to DialogButton[1]</p><p> Actions</p><p> Player - Add 100 to Player 1 (Red) Current gold</p><p> Game - Display to Player Group - Player 1 (Red) the text: You have recieved 100 gold[/code]</p><p> </p><p><u>No Button</u></p><p>[code] Events</p><p> Dialog - A dialog button is clicked for MyDialog</p><p> Conditions</p><p> (Clicked dialog button) Equal to DialogButton[2]</p><p> Actions</p><p> Game - Display to Player Group - Player 1 (Red) the text: You didn't want any gold[/code]</p><p> </p><p>Once these two triggers have been made your Dialog should work and look like shown below.</p><p><img src="http://img178.imageshack.us/img178/1443/100goldfh6.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /><a href="http://img178.imageshack.us/img178/1443/100goldfh6.png" target="_blank">http://img178.imageshack.us/img178/1443/100goldfh6.png</a></p></blockquote><p></p>
[QUOTE="ragingspeedhorn, post: 125240, member: 5868"] [SIZE=18][B][SIZE=4]Basics of a Dialog[/SIZE][/B][/SIZE] [I]by ragingspeedhorn & Orc_Tamer[/I] [U]Note:[/U] In this tutorial we will show you how you create a [I]simple[/I] 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. [SIZE=4]1) What is a dialog?[/SIZE] 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). [SIZE=4]2) Getting Started.[/SIZE] To get started you should (ofcourse) open up the World Editor and enter the Trigger Editor (Hotkey for it is [B]F4[/B]), the icon for it is located inbetween the Terrain Editor & the Sound Editor. [IMG]http://img230.imageshack.us/img230/5782/triggereditorpic9kp.jpg[/IMG] [SIZE=4]3) Creating The Variables.[/SIZE] Once you entered the Trigger Editor the first thing to do is finding the Variable Editor (Hotkey for it is [B]Ctrl+B[/B]), the icon for it is located to the left of the New Category icon. [IMG]http://img230.imageshack.us/img230/3640/variableeditorpic2rn.jpg[/IMG] When you are inside the Variable Editor you click on the green x with a + infront of it [IMG]http://img81.imageshack.us/img81/647/greenx5yy.png[/IMG] to create a new variable, then you make the two variables needed for the Dialog as shown below. [IMG]http://img208.imageshack.us/img208/1166/2variables3zt.jpg[/IMG] [SIZE=4]4) Creating The Dialog Window.[/SIZE] 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. [U]The Dialog Window[/U] [code] 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)[/code] Once this is done the Dialog will apear perfectly but there will be no effect when clicking the buttons. [SIZE=4]5) Creating The Buttons.[/SIZE] To make the buttons actually do something you create two triggers as shown below. [U]Yes Button[/U] [code] 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[/code] [U]No Button[/U] [code] 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[/code] Once these two triggers have been made your Dialog should work and look like shown below. [IMG]http://img178.imageshack.us/img178/1443/100goldfh6.png[/IMG][URL="http://img178.imageshack.us/img178/1443/100goldfh6.png"][/URL] [/QUOTE]
Verification
Post reply
Other Gaming Forum
PC games
Warcraft Tools and Tutorials
Basics of a Dialog
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top