wellwish3r
wishes wells.
- Reaction score
- 52
So if you call this function via another trigger
would this whole block work and be MUI?
the struct etc where declared before
would this whole block work and be MUI?
JASS:
function RangeAttack takes unit u,unit t returns nothing
local integer i = 0
local integer ai
local boolean found = false
local group grp = CreateGroup()
local real facing
loop
exitwhen found == true
if D<i>.attacker == u then
set ai = i
set found = true
endif
set i = i+1
endloop
call TargDmg(D[ai].attacker,t)
set D[ai].stamina = 0
endfunction
private function DmgActions takes nothing returns nothing
endfunction
private function TargDmg takes unit u, unit ta returns nothing\
local trigger t = CreateTrigger()
call TriggerRegisterUnitEvent(t,ta,EVENT_UNIT_DAMAGED)
call TriggerAddAction(t,function DmgActions)
endfunction</i>
the struct etc where declared before