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

workers can auto finish constructing a building?

Status
Not open for further replies.
Level 5
Joined
Jul 10, 2009
Messages
89
Like in many modern RTS games, where idle worker units will flock to help finish buildings under construction, I want a trigger for human worker units that does the same thing. I have buildable walls in my map, and it would vastly reduce micromanagement if idle worker units would automatically help with construction after a foundation has been placed.

Is there an example of this already out there?

Thanks a lot.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
When a unit finishes constructing a unit it should trigger the event "Unit finishes construction". When this event triggers, you'll want to scan an area around the worker for allied buildings that are currently under construction.

To achieve this you'll want to add units being constructed to a unit-group on the "Unit starts construction" event. Then, on the "Unit finishes construction" event you'll want to remove them from the unit-group and scan the unit-group for another structure that still remains incomplete.

My post count is currently the number of my street address.
 
Status
Not open for further replies.
Top