• 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.

Create units at 'unit' location...

Status
Not open for further replies.
Level 5
Joined
Oct 6, 2010
Messages
85
I have a map where you have to capture buildings and I want the captured buildings to spawn individual units.

e.g. player 1 has captured ‘barracks’: create 1 footman for player 1 every 10seconds...
 
Level 5
Joined
Oct 6, 2010
Messages
85
So you use a perodic trigger or timer to pick all buildings and then create the corosponding unit type at them. You can use a hashtable to map unit types to unit types. Ofcourse only if they are owned by a playing player (not neutral).

What would that look like if there was one barracks and I wanted a footman to spawn every 10 seconds if a player owned it.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Based on your statement, you've having problem with creating unit, not with capturing building system, is it ?
A test map is attached
It contains auto-create unit system (doesn't contain any capturing building system in it)
Simply load the test map, the instructions will appear right when you start the map
If you pressed ESC and if the Peasants are still lazy, just spam press it until it gets to work (this is because the Barrack has collide with another barrack, I just set the building location to random around the Peasant unit, that's why sometimes the building location is colliding with each other, making that Peasant disobeys us)
 

Attachments

  • Simple Building Auto Create Unit System.w3x
    15.7 KB · Views: 82
Status
Not open for further replies.
Top