Moderator
M
Moderator
12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.
17:51, 2nd Sep 2012
Magtheridon96: Yes, I know I said this would be the fastest way to detect trees, but this method over here is still quite fast:
It also requires no work at all from the user making it a perfect system.
IcemanBo: Too long as NeedsFix. Rejected.
17:51, 2nd Sep 2012
Magtheridon96: Yes, I know I said this would be the fastest way to detect trees, but this method over here is still quite fast:
JASS:
library IsDestructableTree requires OrderId
globals
private unit dummy = null
endglobals
function IsDestructableTree takes destructable d returns boolean
return IssueTargetOrderById(dummy, ORDER_harvest, d) and IssueImmediateOrderById(dummy, ORDER_stop)
endfunction
private module Init
private static method onInit takes nothing returns nothing
set dummy = CreateUnit(Player(15), 'hpea', 0, 0, 0)
call UnitAddAbility(dummy, 'Aloc')
call ShowUnit(dummy, false)
endmethod
endmodule
private struct InitS extends array
implement Init
endstruct
endlibrary
It also requires no work at all from the user making it a perfect system.