Bueno, he estado trabajando en mi sistema de proyectiles (ya está practicamente listo) pero descubrí que si tengo múltiples misiles y destruyen árboles, el juego se laguea. Las funciones implicadas son estas
[jass]function DestroyTree takes nothing returns boolean
local destructable a = GetFilterDestructable()
call ShowUnit(udg_TreeDestroyer, true)
if IssueTargetOrder(udg_TreeDestroyer, "harvest", a) then
call KillDestructable(a)
endif
call ShowUnit(udg_TreeDestroyer, false)
set a = null
return false
endfunction
//constant
function DestroyTrees takes real x, real y, real AoE returns nothing
local real minX = x - AoE
local real minY = y - AoE
local real maxX = x + AoE
local real maxY = y + AoE
local rect R = Rect(minX, minY, maxX, maxY)
call EnumDestructablesInRect(R, Filter(function DestroyTree), null)
endfunction[/jass]
udg_TreeDestroyer es un campesino
Ayuda Sauron
