Frozenhelfir
set Gwypaas = Guhveepaws
- Reaction score
- 56
For some reason, my trigger in response to a construction event wasn't firing, so I put some debug messages into the trigger. They both display the name of the structure that is being built, but the GetTriggerUnit() should display the unit building the structure. Does anyone have an idea on how to correct this? I've even tried this on the default builders of all the Warcraft III races, and it still says GetTriggerUnit() is the structure being built...
JASS:
private function Cond takes nothing returns boolean
call BJDebugMsg("Cond Called")
call BJDebugMsg("Name of GetConstructingStructure() == " + GetUnitName(GetConstructingStructure()))
call BJDebugMsg("Name of TriggerUnit == " + GetUnitName(GetTriggerUnit()))
.
.
.
.
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_CONSTRUCT_START)
call TriggerAddCondition(t,Condition(function Cond))
call TriggerAddAction(t,function Act)