Narks
Vastly intelligent whale-like being from the stars
- Reaction score
- 90
How do I get the builder in the "A unit begins construction" event? Is it GetTriggeringUnit()?
private function onRelocate() -> boolean
{
SetUnitScale(GetTriggerUnit(), 2, 2, 2);
return false;
}
private function onInit()
{
trigger t = CreateTrigger();
TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_CONSTRUCT_FINISH);
TriggerAddCondition(t, Condition(function onRelocate));
}
?Your event is wrong
EVENT_PLAYER_UNIT_ISSUED_ORDER
if (OrderId() == "build")