• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Unit Spawning

Status
Not open for further replies.
Level 3
Joined
Sep 27, 2008
Messages
18
There might already be a topic on this but i cannot find it.

What do I do to make units spawn from a building periodically. For example have 4 footmen and 2 archers spawn at a base every minute. Also have like a upgrade that allows a knight to spawn with the footmen and archers when the upgrade is researched?
 
Level 9
Joined
May 30, 2008
Messages
430
This is easy search in forums, btw if you wonna help tell how must trigger work. For example the building will produce the units or they will be spawn at region with trigger, and so on. Becouse at question how to create unit it's hard to give you corect answer :thumbs_down:
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
This is a pretty easy answer. You don't need THW to help you find the answer, but all you have to do is browse through the World Editor GUI triggers (the ones you can make with drop-down menu's in the Trigger Editor (F4)). I suggest you make a test map where you make 1 command of each Event, Condition and Actions there is. Then you'll know what the possibilities of GUI triggers are, and you can use your own creative mind to make the triggers you need.
 
Level 7
Joined
Oct 13, 2008
Messages
301
I have Unitauto-spawner on my map, I used quite simple triggers to activate it;

Events - Every 2.00 Seconds of game time
Conditions - None
Actions - Unit Group - Order ( Units in Player 1 <gen> ) To Train A Spawn Level 1.

So, All you really need to do is to create custom / or whatever building you want, that trains unit's in it. Then Wrap region around that building ( My region is on the example Player 1 <gen> ) and make it train the unit you want ( To Train A Spawn Level 1 ).
 
Level 7
Joined
Oct 14, 2008
Messages
340
this here will create 2 footmen at the center of a target region every 30 seconds. make a variable of type point called temp_point, and have a region called spawnRegion at the desired location for the spawns. also leak free.
  • Events
    • Time - Every 30.00 seconds of game time
  • Conditions
  • Actions
    • Set temp_point = center of spawnRegion
    • Unit - create 2 footman at temp_point
    • Custom script: call RemoveLocation(udg_temp_point)
    • Custom script: set udg_temp_point = null
 
Status
Not open for further replies.
Top