Archian
Site Director
- Joined
- Jan 1, 2006
- Messages
- 3,106
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
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.
(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):
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).
Trigger Examples
Below is shown some basic trigger samples.
In this example, I will demonstrate a way to open a Gate without any condition(s).
Here's the trigger i'm using:
In this example, I shall demonstrate a way to open a Gate with a condition.
Here's the trigger:
Here's the trigger i'm using for this demonstration:
The Specific Key
Coming soon...
Links
To be continued »
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"
- GUI (Graphical User Interface)
- Trigger Functions: "ECA" (Events, Conditions & Actions)
- Trigger Examples
| Introduction to The World Editors' "Trigger Editor" |
The map script controls any in-game events not dictated by the user. Triggers are essential for creating maps with complicated goals and atmosphere.
(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).
Button: | Functions: |
Variable Editor ~ MrApple's Beginner's Guide to Variables. | |
Creates a new category for triggers; useful in custom maps with many triggers to keep a better overview. | |
Creates a new trigger. | |
A "comment category" which you can use for "headlines" under (for example) categories so each trigger "group" is kept well organized. | |
Creates a new event for a trigger. | |
Creates a new condition for a trigger. | |
Creates a new action for a trigger. |
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)
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
- Events
- Conditions
- Actions
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.
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.
In this example, I will demonstrate a way to open a Gate without any condition(s).
Here's the trigger i'm using:
-
Gate
-
Events
- Destructible - Lever 0039 <gen> dies
- Conditions
-
Actions
- Destructible - Open Gate (Horizontal) 0038 <gen>
-
Events
In this example, I shall demonstrate a way to open a Gate with a condition.
Here's the trigger:
-
Gate
-
Events
- Destructible - Lever 0039 <gen> dies
-
Conditions
- (Owner of (Triggering unit)) Equal to Player 1 (Red)
-
Actions
- Destructible - Open Gate (Horizontal) 0038 <gen>
-
Events
Here's the trigger i'm using for this demonstration:
-
Sunken Brigde
-
Events
- Unit - A unit enters Region 000 <gen>
-
Conditions
- (Owner of (Entering unit)) Equal to Player 1 (Red)
-
Actions
- Destructible - Resurrect Short Natural Bridge (Vertical) 0000 <gen> with 2500.00 life and Show birth animation
- Animation - Change Short Natural Bridge (Vertical) 0000 <gen>'s animation speed to 95.00% of its original speed
- Trigger - Turn off (This trigger)
-
Events
The Specific Key
Coming soon...
Links
- Basics of Regions
- Trigger (GUI)/ AI editor Tutorials
- Tutorials for beginners
To be continued »