PoLlama Forums  

Go Back   PoLlama Forums > WarCraft > Tutorials

Reply
 
LinkBack Thread Tools Rate Thread
Old 06-24-2007   #1
 
MrOrange's Avatar
 
Join Date: Dec 2006
Posts: 2,992
MrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond repute
Dialogs

Dialog Tutorial
This tutorial will teach you the basics of making a Dialog. This is good because many people new to the World Edit have no idea what it is. It is a pop-up box that you click and some action happens. If you play Ultimate Footmen 0.79c you know there are two modes in it. AP and AR mode. And if you hosted Ultimate Footmen you will see a pop-up box, or dialog, that you can choose from. This tutorial will teach you how to make a simple dialog and how to make the triggers and how they work. All you really need to know is basic GUI triggering.

First, you need to make a dialog variable. Go to the trigger manager and click on the yellow X near the very top. Then Name your variable what you want. It does not matter what you name it. As long as you know what the dialog variable's name is. Then for variable type make it say Dialog. Don't check the array box and don't do anything else but click OK. The Dialog variable is the actual dialog. Where all the dialog information will be kept. Then make another variable. Once again the name does not matter. But this time make the variable type be Dialog Button. And this time check the array box. And then press OK. Dialog buttons have no way of telling what buttons got pressed. So variables are needed so that you can keep track on what button was pressed. My making it an array. You can now make your one variable act as many.

Now that you have the variables that you require. Make a trigger look something like this. The event and condition can be anything you want. Your_Dialog will be what I call your dialog variable and dialog_button will be what I call your dialog variable variables.



The dialog button can be anything you want it to be called. AR, AP, Easy, Hard, anything you want. Now we can't forget about the part of setting your dialog button variable. Without it, that button will be useless except looking good. So after you make your dialog button you have to do an action called set variable. Then make it say "Set (your dialog button)[1](because this trigger was an array you can use numbers that makes then count as a different but same type of variable) = (last created dialog Button)". That will make your variable variable[x] equal that last created dialog button. Then add another button and do it like before. You can add as many as you want. But I'll just stick with two for this tutorial. Now your trigger should look like this.



Because this time the Dialog button array variable had a 2 instead of a 1. They count as two different variables. It's not the best way to put it because you can get confused on what numbers are used, but in this case they are all in one trigger. So you don't have to worry about that. Now find an action called

and change your dialog's name to what ever you want. This should be the finish product.



Now for the very last part of this trigger. You must show this trigger to a player. Don't want all your hard work to go to waste. Find an action called

Now the rest is pretty easy. By the end you should have a trigger like this.



Now you have to make another trigger. Make an entirely new trigger. For event do it like this.



This time you used a condition meaning this must happen before the action is taken place. I used a Dialog Button Comparison condition to show what dialog button variable was clicked. And because before we said that the first dialog button variable was set to the first dialog button made. So when a button on your dialog is clicked. And that button is the first button. Red will get 1000 gold. But because we didn't do anything for the second button. When it is clicked nothing happens. But you could make another trigger like this.



And that is how you make yourself a dialog.


------------------------------
Mini Tutorial-If/Then/Else
------------------------------
A very important action in triggering is the If/Then/Else function. A normal GUI trigger goes like this.

Code:
Something happens
compares something
does something
Well with If/Then/Else. It becomes more like this.

Code:
Something happens
compares something
  compares something
  does something
  if comparison is wrong action
It's almost like adding many triggers into one that has the same event.

Code:
If - It's like a condition
Then - If the condition(if) is right. Do these actions
Else - If the condition(if) is wrong. Do these actions
How does this go with Dialogs? Well try the button clicked trigger with If/Then/Else. Your two triggers.





Look, they have the same event. Let's try to make this into one trigger using the If/Then/Else function.

They will have the same event.


Now for your If/Then/Else function to take it's place.


So this is another way of saying. If if Dialog_Button[1] was pressed. Then do Then actions. If it wasn't then do Else action. Most people put Do Nothing for the else action when they don't want it to do something else. But it's not needed and just a waste of space. If you don't need it. Just leave it blank.

Sometimes You will more then just two dialog buttons. Well what you would do is the same thing but this.


Just keep using more If/Then/Else in the Else function if you have more then 2 buttons.

And now you know how to make your own dialog. So start using them. So you don't have to use chat commands in your map. Sometimes they are good to have. But other times when you add too many. It's hard to memorize and makes the guy who made the map look like a guy new to the World Edit.

--------------------------
Demo Map Below
--------------------------
Attached Files
File Type: w3x Dialog Tutorial.w3x (12.8 KB, 14 views)
MrOrange is offline   Reply With Quote
Old 06-24-2007   #2
 
Join Date: Mar 2007
Posts: 151
Maedhros_Feanor is an unknown quantity at this point
Re: [Tutorial] Dialogs + [Mini-Tutorial] If/Then/Else

Wow nice!
Maedhros_Feanor is offline   Reply With Quote
Old 06-24-2007   #3
 
MrOrange's Avatar
 
Join Date: Dec 2006
Posts: 2,992
MrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond repute
Re: [Tutorial] Dialogs + [Mini-Tutorial] If/Then/Else

Even if the mini-tutorial is not so mini. No one really needs a tutorial about If/Then/Else. Just showing how it's used would be good enough.

More comments please. I want to fix any parts of it that seems funny. Even if you think it's just you. Post it anyway.
MrOrange is offline   Reply With Quote
Old 06-30-2007   #4
 
King Stubby's Avatar
 
Join Date: Mar 2007
Location: Underground
Posts: 5,862
King Stubby is just really niceKing Stubby is just really niceKing Stubby is just really nice
Re: [Tutorial] Dialogs + [Mini-Tutorial] If/Then/Else

wow that's really helpful, if i could just find a use for it.... :P


And now, directly from chip's signature...
King Stubby is offline   Reply With Quote
Old 06-30-2007   #5
 
MrOrange's Avatar
 
Join Date: Dec 2006
Posts: 2,992
MrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond repute
Re: [Tutorial] Dialogs + [Mini-Tutorial] If/Then/Else

They might also be useful help guides. Like if someone types -help then show a dialog with topics. After they click it they get some text explaining it to them. If it's too much to fit in a quest guide.
MrOrange is offline   Reply With Quote
Old 07-04-2007   #6
 
MrOrange's Avatar
 
Join Date: Dec 2006
Posts: 2,992
MrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond repute
Re: [Tutorial] Dialogs + [Mini-Tutorial] If/Then/Else

  • Images added
    Demo Map added
    Spelling errors corrected

Also bump for more votes.
MrOrange is offline   Reply With Quote
Old 07-08-2007   #7
 
MrApples's Avatar
 
Join Date: Sep 2006
Location: Your Mom
Posts: 2,241
MrApples has a spectacular aura about
Re: Dialogs

Moved to Tutorials.

By the way Shadows, it doesn't need to be an array, and is really a bad idea to tell an audience who doesn't know how to use arrays to use them for this.
MrApples is offline   Reply With Quote
Old 07-08-2007   #8
 
MrOrange's Avatar
 
Join Date: Dec 2006
Posts: 2,992
MrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond reputeMrOrange has a reputation beyond repute
Re: Dialogs

I'll add a small section to it before I say to use arrays like I did with the If/Then/Elses.
MrOrange is offline   Reply With Quote
Old 08-25-2007   #9
 
Join Date: Aug 2007
Posts: 3
1ncin3rat0r- is an unknown quantity at this point
Re: Dialogs

Man! I see all these things about mapping on this site, but theres a question that goes unaswered.

HOW TO MAP?! O.o

You see, I am 100% new to mapping, and I just dont get the editor. Can anyone help me with this? Ive been wanting to map since the first day of Wc3 but never really searched uptill now..

I'd really really appreciate your help.. =[
1ncin3rat0r- is offline   Reply With Quote
Old 08-25-2007   #10
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
Re: Dialogs

How to map...

That is some kind of board question, isn't it?

How about start a topic in World Editor Help and ask a few question there?

I'm sure that many of us here will help you good as we can ;).

[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]

"In the end there is no greater motivation than revenge"
SO I HERD U LEIK MUDKIPZ?!
Mr. Zero is offline   Reply With Quote
Old 08-26-2007   #11
 
King Stubby's Avatar
 
Join Date: Mar 2007
Location: Underground
Posts: 5,862
King Stubby is just really niceKing Stubby is just really niceKing Stubby is just really nice
Re: Dialogs

There are 3 sections to mapping; terrain, units/buildings, and triggers. Anyways, back to the topic!

I think that maybe 5 dialogs would be okay in a map. King Leopold has two, and Genesis of Empires II has an entire management system made of dialog boxes!


And now, directly from chip's signature...
King Stubby is offline   Reply With Quote
Reply

Tags
None

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may post replies
You may post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Dialogs MrOrange World Editor Help 16 04-25-2007 06:00 PM


All times are GMT -5. The time now is 05:50 PM.

A friend of Wc3Happy
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165