- Joined
- Nov 4, 2006
- Messages
- 266
Basics of a Trigger
By Kidd|WhiteHeaven|
Contents
What are Triggers?
How do we make a trigger?
How can a Trigger Activate?
What if the trigger doesn't/does have a event if its off?
How come a player won't leave since his unit died?
I know how to do that now, but how do the conditions work?
I kinda know the If/Then/Else function, but I still dont get why some functions have the "Matching Condition" function?
What are Triggers?
Triggers are functions started by Events that go to the Conditions then to the Actions. As like the Map Initialization trigger you ALWAYS find when you open the Trigger Editor in the World Editor.
How do we make a trigger?
To make a trigger, you either click on the button near the other buttons up top, or right click in the trigger panel(left panel) and select "New Trigger", if it says that. Then get working on a trigger.
How can a trigger activate?
As i said in What Are Triggers, triggers are started by events. Events is the MAIN thing to make a trigger work, If there if no event, then it will not work. For Instance,
What if the trigger doesn't/does have an event and its off?
Good Question. Triggers that DONT/DO have events but are off means that they will be on after another trigger finishes and has the "Trigger - Turn on (trigger)" function. For Instance, Here is a Trigger that is on and has the trigger turn on (trigger) function:
How come the player wont leave since his unit died?
Because he wasn't added to the player group LOSERS. To make him leave, you must do this before you turn on the Lost trigger. This belongs in the trigger that turns on Lost.
I know how to do that now, but how does the conditions work?
The conditions work only if it is true. Conditions make what will happen in a trigger be more SPECIFIC. Heres one condition function in the triggers:
I kinda get the If/Then/Else trigger function, but i still dont get why there are some functions that uses the "Matching Condition" function
That is also somehow like If/Then/Else, but much different. And its not a function(to what im just ganna say,) Its a sub-function. Sub-functions are like functions, but controls what the function does. Take the hero level function for example,
This is all for now. If this has helped you, then comment on if this will be approved or not. Thank you for reading!
~Kidd|WhiteHeaven|
By Kidd|WhiteHeaven|
Contents
What are Triggers?
How do we make a trigger?
How can a Trigger Activate?
What if the trigger doesn't/does have a event if its off?
How come a player won't leave since his unit died?
I know how to do that now, but how do the conditions work?
I kinda know the If/Then/Else function, but I still dont get why some functions have the "Matching Condition" function?
What are Triggers?
Triggers are functions started by Events that go to the Conditions then to the Actions. As like the Map Initialization trigger you ALWAYS find when you open the Trigger Editor in the World Editor.
How do we make a trigger?
To make a trigger, you either click on the button near the other buttons up top, or right click in the trigger panel(left panel) and select "New Trigger", if it says that. Then get working on a trigger.
How can a trigger activate?
As i said in What Are Triggers, triggers are started by events. Events is the MAIN thing to make a trigger work, If there if no event, then it will not work. For Instance,
- Events
- Map Initialization
- Conditions
- Actions
- Unit - Make (Footman 021) Invulnerable
What if the trigger doesn't/does have an event and its off?
Good Question. Triggers that DONT/DO have events but are off means that they will be on after another trigger finishes and has the "Trigger - Turn on (trigger)" function. For Instance, Here is a Trigger that is on and has the trigger turn on (trigger) function:
- Events
- Unit - A unit dies
- Conditions
- Actions
- Game - Display Text to All Players with text HAHAHAHAHAHHAHA! YOU LOSE!!!!
- Trigger - Turn on (Lost)
- Events
- Conditions
- Player Group - Pick all players in LOSERS and do Game - Defeat (Picked Player) with Message Wow you suck! Seriously!
How come the player wont leave since his unit died?
Because he wasn't added to the player group LOSERS. To make him leave, you must do this before you turn on the Lost trigger. This belongs in the trigger that turns on Lost.
- Events
- Unit - A unit died
- Conditions
- Actions
- Game - Display text to All Players with text HAHAHAHAHHAHA YOU LOSE!!
- Player Group - Add (Owner of (Triggering Unit)) to LOSERS
- Trigger - Turn on Lose
I know how to do that now, but how does the conditions work?
The conditions work only if it is true. Conditions make what will happen in a trigger be more SPECIFIC. Heres one condition function in the triggers:
- (Triggering Unit) is A Hero) equal to True
I kinda get the If/Then/Else trigger function, but i still dont get why there are some functions that uses the "Matching Condition" function
That is also somehow like If/Then/Else, but much different. And its not a function(to what im just ganna say,) Its a sub-function. Sub-functions are like functions, but controls what the function does. Take the hero level function for example,
- Hero - Set (Triggering Unit) to Level 10, hide leveling graphics
This is all for now. If this has helped you, then comment on if this will be approved or not. Thank you for reading!
~Kidd|WhiteHeaven|
Last edited: