//TESH.scrollpos=0
//TESH.alwaysfold=0
Name | Type | is_array | initial_value |
Dest | destructable | No | |
DestChecker | unit | No | |
IsDestTree | boolean | No | |
TreeKill | boolean | No | |
TreeKill_Init | boolean | No |
//TESH.scrollpos=0
//TESH.alwaysfold=0
function IsDestTree takes destructable d returns boolean
return IssueTargetOrderById(udg_DestChecker,852018,d) and IssueImmediateOrderById(udg_DestChecker,851972)
endfunction
function DestroyTree takes destructable d returns nothing
if IsDestTree(d) and GetWidgetLife(d) > 0.405 then
call KillDestructable(d)
endif
endfunction
function InitTrig_IsDestTree takes nothing returns nothing
set udg_DestChecker = CreateUnit(Player(15), 'hpea', 0, 0, 0)
call UnitAddAbility(udg_DestChecker, 'Aloc')
call UnitAddAbility(udg_DestChecker, 'Ahrl')
call ShowUnit(udg_DestChecker, false)
endfunction