• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Trigger help!

Status
Not open for further replies.
Level 8
Joined
Jul 9, 2004
Messages
405
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 :/
 
Level 7
Joined
Apr 25, 2004
Messages
241
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 :)
 
Level 7
Joined
Jul 30, 2004
Messages
451
this is off the top of my head

Code:
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
 
Level 8
Joined
Jul 9, 2004
Messages
405
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 =/
 
Level 7
Joined
Apr 25, 2004
Messages
241
RaD- said:
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.
 
Level 8
Joined
Jul 9, 2004
Messages
405
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
 
Level 5
Joined
Jul 11, 2004
Messages
183
RaD- said:
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 :)
 
Status
Not open for further replies.
Top