- Joined
- Jun 7, 2008
- Messages
- 440
I have this little part of a trigger which is really simple. But for some reason I get a syntax. Can anyone help me out?
Also, if I wanted to create an additional dummy unit and give it a different spell with a different expiration timer, could I possibly do this inside the loop? Or would I have to do another loop? Sounds like a dumb question
Thanks for the help.
JASS:
function Trig_Lightning_Actions takes nothing returns nothing
local unit cast = GetTriggerUnit()
local real x = 0
local real y = 0
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 dumb = CreateUnit(GetOwningPlayer(cast), 'h008', x, y, 0.)
call UnitAddAbility(dumb, 'A01H')
call IssueTargetOrder(dumb, "chainlightning", cast)
call UnitApplyTimedLife(dumb, 'BTLF', 10) // This is my syntax
endloop
set cast = null
set dumb = null
endfunction
Also, if I wanted to create an additional dummy unit and give it a different spell with a different expiration timer, could I possibly do this inside the loop? Or would I have to do another loop? Sounds like a dumb question