![]() | |
| | #1 |
![]() Join Date: Dec 2006
Posts: 2,992
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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 Code: Something happens compares something compares something does something if comparison is wrong action 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 ![]() ![]() 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 -------------------------- |
| | |
| | #2 |
![]() Join Date: Mar 2007
Posts: 151
![]() | Re: [Tutorial] Dialogs + [Mini-Tutorial] If/Then/Else Wow nice! |
| | |
| | #3 |
![]() Join Date: Dec 2006
Posts: 2,992
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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. |
| | |
| | #4 |
![]() Join Date: Mar 2007 Location: Underground
Posts: 5,862
![]() ![]() ![]() | 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... ![]() |
| | |
| | #5 |
![]() Join Date: Dec 2006
Posts: 2,992
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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. |
| | |
| | #6 |
![]() Join Date: Dec 2006
Posts: 2,992
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: [Tutorial] Dialogs + [Mini-Tutorial] If/Then/Else
Also bump for more votes. |
| | |
| | #7 |
![]() Join Date: Sep 2006 Location: Your Mom
Posts: 2,241
![]() | 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. |
| | |
| | #8 |
![]() Join Date: Dec 2006
Posts: 2,992
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: Dialogs I'll add a small section to it before I say to use arrays like I did with the If/Then/Elses. |
| | |
| | #9 |
![]() Join Date: Aug 2007
Posts: 3
![]() | 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.. =[ |
| | |
| | #10 |
![]() Join Date: Sep 2006 Location: Denmark (GMT+1)
Posts: 2,173
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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 ;). |
| | |
| | #11 |
![]() Join Date: Mar 2007 Location: Underground
Posts: 5,862
![]() ![]() ![]() | 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... ![]() |
| | |
![]() |
| Tags |
| None |
| Thread Tools | |
| Rate This Thread | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] Dialogs | MrOrange | World Editor Help | 16 | 04-25-2007 06:00 PM |