![]() | |
| | #1 |
![]() Join Date: Apr 2008
Posts: 14
![]() | Spawning units I was wondering how you make a trigger so a unit spawns when you build a building every time the timer ends. Ex. I build a barracks then the timer goes off i get 1 footmen. I build another barracks timer goes off and then i get 2 footmen for a total of 3 footmen from both spawns. |
| | |
| | #2 |
![]() Join Date: Oct 2007
Posts: 1,089
![]() ![]() | Re: Spawning units well u need 2 trigged for this first one some thing like event:timer ends action: spawn 1 footmen if [var]=1 spawn 2 footmen else nothing other trigger event: biulding is made condition: last biuldin made=barrack action: set [var]=1 sorry dont have time to make the trigger and psot ti hope that helps |
| | |
| | #3 |
![]() Join Date: Apr 2008
Posts: 14
![]() | Re: Spawning units I have tried to make the second one but i can't find a way to make the second trigger any help that is more specific is greatly appreciated |
| | |
| | #4 |
![]() Join Date: Oct 2007
Posts: 1,089
![]() ![]() | Re: Spawning units first trigger Code: Untitled Trigger 001
Events
Time - timer expires
Conditions
Actions
Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
variable_footmen Greater than or equal to 1
Then - Actions
Unit - Create 2 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Else - Actions Code: Untitled Trigger 002
Events
Unit - A unit Finishes construction
Conditions
(Unit-type of (Constructed structure)) Equal to Barracks
Actions
Set variable_footmen = (variable_footmen + 1) Code: Untitled Trigger 001 Copy
Events
Time - timer expires
Conditions
Actions
Unit - Create ((variable_footmen x 2) + 1) Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees |
| | |
| | #5 |
![]() Join Date: Apr 2008
Posts: 14
![]() | Re: Spawning units Thank you so much, now I'm actually motivated again to start moving my map forward. |
| | |
| | #6 |
![]() Join Date: Oct 2007
Posts: 1,089
![]() ![]() | Re: Spawning units your welcome gl with your map |
| | |
| | #7 |
![]() Join Date: Sep 2006 Location: Denmark (GMT+1)
Posts: 2,173
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Re: Spawning units Hint: Remember to add another trigger: Code: event - Unit dies condition - Unit Type of dying unit equals Barracks action - set Set variable_footmen = (variable_footmen - 1) |
| | |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Warcraft 3 Terminology | Kuramawhip | Guides | 2 | 08-22-2008 09:04 PM |
| Unit editor basic guide | Halakbalakbalak | Submit a Tutorial [World Editor] | 1 | 10-19-2007 02:18 PM |
| Units Spawning After Capturing CoP | DarkBlade | World Editor Help | 10 | 08-01-2007 05:24 AM |
| For each Hero per race, what is your fav/most needed spell and why? | Wartechnician | World Editor Help | 9 | 07-25-2007 08:53 PM |
| Cinematics! | CaptainSnake | World Editor Help | 17 | 05-18-2007 11:39 AM |