[jass]
function magic2 takes unit TriggerU,real numb returns nothing
local real x = GetUnitX(TriggerU)
local real y = GetUnitY(TriggerU)
local real x2
local real y2
local integer num1 = 1
local real space
local unit array MmU
loop
exitwhen num1 > numb
set space = ( space + 20.00 )
set x2 = ( x + ( space * CosBJ(GetUnitFacing(TriggerU)) ) )
set y2 = ( y + ( space * SinBJ(GetUnitFacing(TriggerU)) ) )
set MmU[num1] = CreateUnit(GetOwningPlayer(TriggerU), 'e000', x2, y2, GetUnitFacing(TriggerU))
set num1 = num1 + 1
endloop
set space = 0.00
endfunction
[/jass] |