• 🏆 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!

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