Note, that the tutorial is still in progress. Feel free to post comments & suggestions for improval :)
Basics of Triggers
By Archian
My ten-year-old cousin has just started warcraft III modding, and has begun experimenting with the Trigger Editor.
I promised that I would make a little tutorial relating to how to make some *very* basic, but useful triggers for custom maps.
This tutorial is also meant as a source of information that may encourage newcomer's to start triggering and from there, develop their knowlege.
So when you're done reading this tutorial, go inside the World Editor and do some experimenting yourself :)
Click the images for larger versions.
The "target group" of this tutorial is of course; beginners.
Table of Content
 | Introduction to The World Editors' "Trigger Editor" |
The trigger editor is where the map script is written, either in GUI triggers or directly in
JASS.
The map script controls any in-game events not dictated by the user. Triggers are essential for creating maps with complicated goals and atmosphere.
| Trigger Editor: (Menu Bar\Module\Trigger Editor) |  |
(From left to right: Variables... (Ctrl+B), New Category (Ctrl+G), New Trigger (Ctrl+T), New Trigger Comment (Ctrl+M), New Event (Ctrl+E), New Condition (Ctrl+D), New Action (Ctrl+R).
Of course, you can just right-click on the list, a trigger or a category to create the above mentioned.
GUI (Graphical User Interface)
A graphical user interface, is a particular case of user interface for interacting with a computer which employs graphical images and widgets in addition to text to represent the information and actions available to the user.
Usually the actions are performed through direct manipulation of the graphical elements.
Trigger Functions: "ECA" (Events, Conditions & Actions)
Note; each individual trigger can be created using various of countless (describing many) methods.
You will most likely come to discover that as you gain more experience.
There are 3 "categories" of trigger functions (Events, Conditions & Actions):

Trigger Functions
Notice, that these could be compared with the "cause and effect" theory. The cause and effect (Event and Action) with an optional "Condition" included.
When the event(s) occur, all conditions are met, the action(s) will take place.
Events
A trigger will start when
any of the events listed occur.
Note; you can "run" a trigger from another trigger without having those events occuring.
Conditions
Conditions are specific requirements which the trigger must observe.
It cannot perform it's actions unless
all the condition requirements have been covered.
Note; that you can have 'And' / 'Or' conditions as well. Triggers that are run from another trigger have the option to ignore these conditions.
Actions
If the event occurs, all conditions have been met, then this is the action(s) that the trigger will perform.
Note; that you can may 'Run' other triggers or turn other triggers OFF or ON as well.
Note; You may put any new triggers in the original
Melee Initialization category created by the world editor, but you are not obligated to.
Categories have no influence on the functionality of the trigger, so it doesn't matter which order you put them in.
Enable, Initially On & Trigger Comments
Notice that there are 3 fields at the top of each trigger (highlight'ed below).

- Enabled - Determines whether or not the trigger is enabled in your map. If 'disabled', the trigger has no function.
- Initially On - Triggers can be turned ON and OFF. When checked, the trigger will initially be ON when the game begins.
- Trigger Comment - Is a text field area where you can add any comments regarding the specific trigger. Keep in mind that it has no impact on functionality.
Trigger Examples
Below is shown some basic trigger samples.
| Opening A Gate #1 |   |
In this example, I will demonstrate a way to open a Gate without any condition(s).
Here's the trigger i'm using:

Gate
In this example, I shall demonstrate a way to open a Gate with a condition.
Here's the trigger:

Gate
Here's the trigger i'm using for this demonstration:

Sunken Brigde
The Specific Key
Coming soon...
Links
To be continued »