PoLlama Forums  

Go Back   PoLlama Forums > WarCraft > World Editor Help

Reply
 
LinkBack Thread Tools
Old 05-13-2008   #1
 
olaf76's Avatar
 
Join Date: Apr 2008
Posts: 14
olaf76 is an unknown quantity at this point
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.
olaf76 is offline   Reply With Quote
Old 05-13-2008   #2
 
shocker's Avatar
 
Join Date: Oct 2007
Posts: 1,089
shocker is a jewel in the roughshocker is a jewel in the rough
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
shocker is offline   Reply With Quote
Old 05-15-2008   #3
 
olaf76's Avatar
 
Join Date: Apr 2008
Posts: 14
olaf76 is an unknown quantity at this point
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
olaf76 is offline   Reply With Quote
Old 05-15-2008   #4
 
shocker's Avatar
 
Join Date: Oct 2007
Posts: 1,089
shocker is a jewel in the roughshocker is a jewel in the rough
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
2nd trigger
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)
also if u wanted it 2 work so every barrack u made added 2 footmen spawn use this one one the first one
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
**variable_footmen is a variable that starts at the value 0
shocker is offline   Reply With Quote
Old 05-16-2008   #5
 
olaf76's Avatar
 
Join Date: Apr 2008
Posts: 14
olaf76 is an unknown quantity at this point
Re: Spawning units

Thank you so much, now I'm actually motivated again to start moving my map forward.
olaf76 is offline   Reply With Quote
Old 05-16-2008   #6
 
shocker's Avatar
 
Join Date: Oct 2007
Posts: 1,089
shocker is a jewel in the roughshocker is a jewel in the rough
Re: Spawning units

your welcome gl with your map
shocker is offline   Reply With Quote
Old 05-17-2008   #7
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
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)
Sorry don't have WE open right now.

[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]

"In the end there is no greater motivation than revenge"
SO I HERD U LEIK MUDKIPZ?!
Mr. Zero is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


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


All times are GMT -5. The time now is 08:28 PM.

A friend of Wc3Happy
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165