• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Cant find condition for Constructing Unit.

Status
Not open for further replies.
Level 5
Joined
Feb 19, 2008
Messages
110
Well, as the title says, i can't find any way to detect the unit constructing a structure.

My trigger goes:
-Unit begins construction.
-(I want to check if the constructing unit has a special item)
-"My actions"

Anybody know how to detect the constructing unit? :confused:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Impossible without a complex system. This is because buildings do not have to be started by a builder and can infact be started by any old unit.

Thus the only real way is to guess who builds a building via triggers.

How I did this was start by getting when an order to build a building is issued, and then knwoing that unit must build the building there. If a building is started construction at that point then it must be from that builder. You add other checks mike making sure the building is owned by the right player, that the building is the right type etc and you can obtain near 100% accuracy. The only thing my system failed to do was if more than one builder orderd the same building at the same point for the same player, then it would get one of the builders seemingly randomly and make it the constructor.
 
Status
Not open for further replies.
Top