Warcraft III resources & community, 2003–2006 · archived

Trigger help!

12 posts
#1

Trigger help!

im making farmer and hunter map and i need a trigger that is like when a building is built every 20 seconds of the game it makes a pig at the building... i need 3 of them though but i dont know how to get it to work like that :/
#2
Events

Time - Every 20.00 seconds of game time


Conditions

(Destructible-type of (Last created destructible)) Pig Farm


Actions

Unit - Create 1 Pig for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees


I dont know if this will work or not... I am new at triggers and map making and things like that... Let me know if it works so I know whether to be proud of myself or not :)
#3
this is off the top of my head


events-
every 20 seconds of game time
conditions-
none
actions-
pick every unit of type (farm) and do actions
++++if (custom value) of picked unit is less than 3 then
++++++++create (pig) at (position of picked unit) for (owner of picked unit)
++++++++set custom value of (picked unit) to (custom value of picked unit + 1)
++++else
++++++++do nothing
#4
leissaK-

well i didnt test it but i dont think it works because for 1 pig farm isnt doodad its a unit (i changed it) and it didnt seem to work and also the pigs spawned in the middle of the map not at the farm =/
#5
i decided to make it so when its the building is made it starts training units automatically and they take 20 secodns to build =D smart huh!
#6
i cant get that trigger to work either... god i suck
#7
RaD-leissaK-

well i didnt test it but i dont think it works because for 1 pig farm isnt doodad its a unit (i changed it) and it didnt seem to work and also the pigs spawned in the middle of the map not at the farm =/


Change the part where it says they spawn in center of playable map area to the building they are supposed to summon in (can also be a region)

Forgot to include that sry.
#8
ok i dont think it worked... so im gonna try this:

Event: every 20 seconds

Conditions: none

Actions: Pick every unit on map and do action: if type of picked unit equal to sheep farm then do create 1 sheep at rally point of picked unit elso do nothing... should work right =D
#9
Yes that should work, but you may get some bugs if you do not have any conditions concerning the farm and controllers.
#10

Re: Trigger help!

RaD-im making farmer and hunter map and i need a trigger that is like when a building is built every 20 seconds of the game it makes a pig at the building... i need 3 of them though but i dont know how to get it to work like that :/


you need to make a variable for this otherwise its will never work,, cause i dont understand what exactly you want,,, maybe a little explains :) cause if triggers dont understand you its will not work for you it will not do action for you..you know wat i mean :)
#11
ok lets just ignore my solution...
#12
ill try yours raptor i just didnt notice it...