- Joined
- Aug 18, 2007
- Messages
- 1,390
Welcome
Hi all, i saw alot of people asking for this, so i'd made a tutorial of it.
Getting Started
Triggers looks advanced on first look, ill remmember my first try, wich spawned a peon every second on the map, where it should only spawn one
But away from that, i'll introduce you.
Each trigger is divided into 3 parts, Events, Conditions and Actions
Events is WHEN the trigger is excecuted, when the trigger happens
Conditions is what NEEDs to be fullfilled before the actions takes place
Actions is WHAT happens
All Actions, Events and Conditions does excactly what they say, like the action called Unit - Kill, kills a unit
That makes sence right?
I will guide you through a simple spawn trigger, then youre on your own!
I want this trigger, to create 3 Peasants at the middle of my map, when a Paladin enters a "region"
Makeing the "region"
First, ill make a region:
1: Click "R" when you're watching your terrain.
2: This will popup:
3: Click this button wich means "Create Region"
4: Pull out an area on the terrain, like when selecting multiple units ingame.
5: Go rename the region by Right clicking the region name and choose "Rename Region" or "Region Properties"
Now type in Spawn 3 peasants
Now, we got a Region called "Spawn 3 peasants". This is the region we want to have the paladin enter, for spawning some peasants.
We want to make the trigger now, so open the trigger editor, looking like an "A"
Now click the piece of paper, wich got a BOLD frame.
Event, Condition and Action
Now lets make the trigger:
1: Click the Event icon, it looks like a red flag.
2: Find the text called Unit - Unit enters Region
3: You see that Region is red, thats because "Region" is invalid. Click the red text, and under "Varibles" you'll see the Spawn 3 Peasants region!
4: Click the Spawn 3 peasants region, and press "OK"
5: Click "OK" again, as our Event is done! HOORAY!
Now, we need a condition, to tell that we only want it to spawn when its a Paladin who enters.
So, Click the Condition icon, looking like a piece of paper with a green arrow on.
1: Find the text called Unit - type comparison
2: Click the text "Footman" and click the icon of the paladin
3: Press "OK" twice.
(The text wich says "Triggering Unit" means that its the unit were talking about in the event, we could change it to "Entering unit", but right here its unneseary. If we would like to make a trigger wich created a unit for a plyaer, when his unit dies, and kills the unit who attacked, we would have to use "Killing unit" and "Dying Unit" as the event only talks about one of them.)
Now lets make our Action. Press the Action icon, it looks like one of thoose funny movie things.
1: Find the text Unit - Create units facing angle
2: Footman is'ent the unit we want, so click the text, and then the icon of a peasant.
3 now, we would like 3, not one, so click the text "1" and type in "3" instead. Notice that thoose 3 is spawned at the same point!
4: Press ok twice.
DONE!
Voila, were done!
it should look like this:
When a paladin enters our region, the map creates a unit at the "center of playable map area" wich is the middle of our map.
Thats all from me, if you wonna test the trigger, place a paladin using the Unitpalette, wich can be assced by pressing "U" when looking at the terrain
or by clicking the drop menu at the region pallete and click "Unit".
//Lord_of_Sausage
Hi all, i saw alot of people asking for this, so i'd made a tutorial of it.
Getting Started
Triggers looks advanced on first look, ill remmember my first try, wich spawned a peon every second on the map, where it should only spawn one
But away from that, i'll introduce you.
Each trigger is divided into 3 parts, Events, Conditions and Actions
Events is WHEN the trigger is excecuted, when the trigger happens
Conditions is what NEEDs to be fullfilled before the actions takes place
Actions is WHAT happens
All Actions, Events and Conditions does excactly what they say, like the action called Unit - Kill, kills a unit
That makes sence right?
I will guide you through a simple spawn trigger, then youre on your own!
I want this trigger, to create 3 Peasants at the middle of my map, when a Paladin enters a "region"
Makeing the "region"
First, ill make a region:
1: Click "R" when you're watching your terrain.
2: This will popup:
3: Click this button wich means "Create Region"
4: Pull out an area on the terrain, like when selecting multiple units ingame.
5: Go rename the region by Right clicking the region name and choose "Rename Region" or "Region Properties"
Now type in Spawn 3 peasants
Now, we got a Region called "Spawn 3 peasants". This is the region we want to have the paladin enter, for spawning some peasants.
We want to make the trigger now, so open the trigger editor, looking like an "A"
Now click the piece of paper, wich got a BOLD frame.
Event, Condition and Action
Now lets make the trigger:
1: Click the Event icon, it looks like a red flag.
2: Find the text called Unit - Unit enters Region
3: You see that Region is red, thats because "Region" is invalid. Click the red text, and under "Varibles" you'll see the Spawn 3 Peasants region!
4: Click the Spawn 3 peasants region, and press "OK"
5: Click "OK" again, as our Event is done! HOORAY!
Now, we need a condition, to tell that we only want it to spawn when its a Paladin who enters.
So, Click the Condition icon, looking like a piece of paper with a green arrow on.
1: Find the text called Unit - type comparison
2: Click the text "Footman" and click the icon of the paladin
3: Press "OK" twice.
(The text wich says "Triggering Unit" means that its the unit were talking about in the event, we could change it to "Entering unit", but right here its unneseary. If we would like to make a trigger wich created a unit for a plyaer, when his unit dies, and kills the unit who attacked, we would have to use "Killing unit" and "Dying Unit" as the event only talks about one of them.)
Now lets make our Action. Press the Action icon, it looks like one of thoose funny movie things.
1: Find the text Unit - Create units facing angle
2: Footman is'ent the unit we want, so click the text, and then the icon of a peasant.
3 now, we would like 3, not one, so click the text "1" and type in "3" instead. Notice that thoose 3 is spawned at the same point!
4: Press ok twice.
DONE!
Voila, were done!
it should look like this:
When a paladin enters our region, the map creates a unit at the "center of playable map area" wich is the middle of our map.
Thats all from me, if you wonna test the trigger, place a paladin using the Unitpalette, wich can be assced by pressing "U" when looking at the terrain
or by clicking the drop menu at the region pallete and click "Unit".
//Lord_of_Sausage
Last edited: