World Editor FAQ
Ok, since triggers is my area of expertise, and most people have the most problems there, thats what this FAQ will be about... (You can ask questions which will be added to the FAQ if they are relevant)
Question: What is WE, and how do I use it?
Answer: 99.99% of the people here know the answer but... to avoid the .01% that don't, it is in your warcraft III directory, default: C:\Program Files\Warcraft III then find World Editor.exe and double click it. WE is an acronym (or a few letters made to make typing out long phrases easier) and stands for World Editor
Question: How come the game crashes when a certain trigger I made runs?
Answer: Make sure that there are no triggers that do an infinite loop (usually done by using the Run Trigger action) and also make sure you don't do something impossible, like finding the custom value of a unit that got removed from the game using a Unit - Remove Action
Q: How do I make a working dialog?
A: For your initilization trigger, make the event Time - Elapsed game time is 0.01 seconds, NOT MAP INITIALIZATION! Next, go into the Variable Editor (Control+B Hotkey) and make a new Variable with any name you want, as a Dialog, and then make Dialog Button variables. When you are done, hit Ok, then go into your initilization trigger, and place these actions:
Actions
Dialog - Change the title of YourDialogVariable to Any Title Here
Dialog - Create a dialog button for YourDialogVariable labelled Left
Set Button1 = (Last created dialog Button)
Dialog - Create a dialog button for YourDialogVariable labelled Right
Set Button2 = (Last created dialog Button)
Dialog - Create a dialog button for YourDialogVariable labelled Look Around
Set Button3 = (Last created dialog Button)
Dialog - Create a dialog button for YourDialogVariable labelled Inventory
Set InventoryButton = (Last created dialog Button)
I'll break that down:
Dialog - Change Title
Dialog - Create Dialog Button
Set (dialog button variable)
[the action called Set Variable]
Q: Now that I made a dialog creation, how do I show it and make it work?
A: Showing the Dialog: In any trigger, after you set the events and conditions, go to the Actions section and use the action: Dialog - Show/Hide Dialog, and choose to Show the dialog variable you created, in my case: YourDialogVariable is my variable's name.
Dialog Results: Now that it shows the dialog correctly (if you followed the instructions correctly) you must make a new trigger. The events/conditions of this trigger should be:
Events
Dialog - A dialog button is clicked for YourDialogVariable
Conditions: Use the condition [Dialog Button Comparsion] to set this:
Conditions
(Clicked dialog button) Equal to [Your Variable, such as Button1 or InventoryButton]
Actions
This is where you get to set what you want... and since the new patch, Triggering Player refers to the player who clicked the dialog button, so if you want to create 1 peon for the player if they chose the peon button, use the: Unit - Create 1 Peon for (Triggering Player) at (Triggering Player's Start Location), or something to that affect
Q: How do I refer to a non-preplaced unit without using an event?
A: In order to do this, you must use the Unit Group section of triggers, and use Unit Group - Pick Every Unit in Unit Group and Do Multiple Actions... when you go into it, it should say: Units in Region (Playable Map Area)... change that to Units of Type, or whatever you need to fit the unit you want to refer to. Refering to certain units must be done by Pick Every Units in (Playable Map Area) matching conditions, and then use the And condition to refer to multiple conditions, and use [Matching Unit] for referring to units considered for the All Units Matching Condition's conditions that you set.
Q: How come I get an error that says something like 'Trigger Data is Missing or Invalid' when trying to open a map I downloaded?
A: The creator of this map has 'Protected' the map you are trying to open, which is basically making the map unusable to you. The creator does this to prevent people messing with the map, or stealing credit for it. To protect your own map, open the Import Manager (Hotkey F12) and then hit the Import Button (Control I) and import a blank text file, then double click on the imported file in the file manager, and then check off the box that says 'Use Custom Path'... Highlight the whole path, and change it to be exactly this: war3map.wtg
Make sure that you take out the war3mapImported\, or it will not work... and once you do this, SAVE YOUR MAP AS A DIFFERENT FILE NAME... BECAUSE YOU WILL BE UNABLE TO OPEN THE PROTECTED MAP AFTER SAVING IT. Make sure you have a seperate, 'Unprotected' copy of the map, so you don't lock yourself out of your own map.
Q: What is a variable...? and how do I use it?
A: A variable is anything that stores data of some type, whether it be a real, an integer, a boolean, a dialog, etc, etc. Variables are actually alot less confusing, and alot more useful, then most people think they are. For example: you want it so that when they kill the dragon king or something, they complete a quest... you could have it so that when the 'dragon king' is killed, it will use the Set Variable action and set a variable you made named Quest1Status (Must be 1 word, no spaces) and you could set it to be True and use an If/Then/Else action...
To sum it up, a variable can store any value, and be checked at any time using If/Then/Else or substituted for a value.
Q: What is an Array Variable, and what does Size mean when I choose to make one?
A: An Array Variable is the same thing as a variable, but it can store multiple values, 1 for each index, which can be used to pick specific values. To be more specific, after making a variable, you have to fill the [Index] to specify which value its referring to. A good time to use arrays in when you set the index to match the Player Number of (Triggering Player), and have events refer to the player number, so that you can store values that are specific to all players, but different.
Size: Size is the max amount the Index can go to, and if you are referring to players, it should be set to 12, but if your referring to a TD of some sort, and monsters that appear each round, you could set it to the max amount of rounds, or simply 99 and not use some of them.
Q: What is If/Then/Else, and is it important?
A: If/Then/Else will most likely be used many times by you, after you learn how to use it well... basically it does what it says: IF the conditions you specify are true, it will do actions in the THEN section... if they are not true, it will do the actions in the ELSE section... for example, if you have the condition: Integer Comparison, to check: Player 1 Red's gold and see if its Greater Then Or Equal To 50, then if that is true, it will do all the actions in the Then Section, but his gold is 49 or less, it will do the actions in the Else section.
Q: I saw some interesting things done with doodads... How can I do these myself?
A: If your are placing doodads, and would like their sides to overlap, hit the "shift" key, and hold it down. Now you will be able to place partially overlapping doodads. Do not abuse this, certain doodads can make a lot of lag when overlapped. (Thanks to Tassadar920)... and my own information, for Floating or Flying doodads... After you place your doodad on the map, select it then hold control. While holding the Control button, hold Page Up or Page Down to make it go up or down in elevation.
Q: How can I make a "Cave" with a ceiling?
A: It can be done using the "Shift Method" as stated above, holding shift while placing the doodad called: Rock Archway (Structures), or alternatly, another method is to place doodads then use the "Elevation Method" also detailed above, and use it to manually create the cieling... I prefer the "Shift Method" as it is much faster, and also you can add extra doodads to cover up the fact that you even did the shift method. There is 3rd method which is somewhat different... If you place an "Underground Dome" (Cinematic) doodad, on the outside you can't see it, but on the inside of it, it shows as a dome.