- Joined
- Jun 7, 2008
- Messages
- 440
I need little help with this. Check it out and see what I did wrong please.
Any help is appreciated +rep
JASS:
function Trig_Pacifier_Copy_Actions takes nothing returns nothing
local unit cast = GetTriggerUnit()
local real x = 0
local real y = 0
local location p
local unit dumb
local integer i = 1
local integer o = 8
loop
exitwhen i>o
set i = i + 1
set x = GetUnitX(cast) + 500 * Cos(x + 45.*bj_DEGTORAD)
set y = GetUnitY(cast) + 500 * Sin(y + 45.*bj_DEGTORAD)
set p = Location(x,y)
set dumb = CreateUnit(GetOwningPlayer(cast), 'h008', p, 0.00)
// ^^^^I get a syntax
call UnitAddAbility(dumb, 'A01H')
call IssueTargetOrder(dumb, "chainlightning", cast)
call UnitApplyTimedLife(dumb, 'BTLF', 10)
call RemoveLocation(p)
call TriggerSleepAction(.5)
endloop
endfunction
Any help is appreciated +rep