Komaqtion
You can change this now in User CP.
- Reaction score
- 469
Well, do all messages show in all of the functions ?!
If so, then there shouldn't be a problem...
If so, then there shouldn't be a problem...
private rect r = Rect(0,200.,0,200.)
0 AoE.
library someLib initializer Init
private struct DDIC
real x
real y
real r
real d
endstruct
globals
private DDIC ddic
boolexpr BE_TRUE
endglobals
private function TrueBoolexpr takes nothing returns boolean
return true
endfunction
function IsDestructableInCircle takes destructable d returns boolean
return ( (Pow(GetDestructableX(d)-ddic.x,2)+Pow(GetDestructableY(d)-ddic.y,2)) <= (ddic.r*ddic.r) )
endfunction
function DamageTreesInCircleEnum takes nothing returns nothing
local destructable d=GetEnumDestructable()
if (GetWidgetLife(d)>.405) and not(IsDestructableInvulnerable(d)) and IsDestructableInCircle(d) then
call KillDestructable(d)
endif
set d=null
endfunction
function DamageTreesInCircle takes real x, real y, real radius returns nothing
local rect r=Rect(x - radius,y - radius,x + radius,y + radius)
set ddic.x = x
set ddic.y = y
set ddic.r = radius
call EnumDestructablesInRect(r,BE_TRUE,function DamageDestructablesInCircleEnum)
call RemoveRect(r)
set r=null
endfunction
private function Init takes nothing returns nothing
set ddic = DDIC.create()
set BE_TRUE = Condition(function TrueBoolexpr)
endfunction
endlibrary