- Joined
- Jul 10, 2007
- Messages
- 6,306
So, how would I go about catching all attacks by units?
I've run out of ideas on how to accomplish this ; (.
I guess the only thing I can't seem to capture is attacks from an attackground order.
Any help would be appreciated ; D.
edit
IDEA!!
On attackground order, create a tiny invisible unit at the point and have the thing attack that instead. On create, link that unit to the attacker so that future orders can just move the unit. On deindex, recycle the invis unit.
EVENT_PLAYER_UNIT_ATTACKED
only works if the attack has a targetEVENT_PLAYER_UNIT_ISSUED_ORDER
and all of the variants work, but the orders are only issued one time. If the order is something like attack ground with a canon tower, you're screwed ; P.I've run out of ideas on how to accomplish this ; (.
I guess the only thing I can't seem to capture is attacks from an attackground order.
Any help would be appreciated ; D.
edit
IDEA!!
On attackground order, create a tiny invisible unit at the point and have the thing attack that instead. On create, link that unit to the attacker so that future orders can just move the unit. On deindex, recycle the invis unit.
Last edited: