JASS:
function Trig_Fire_Nova_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function Trig_Fire_Nova_Actions takes nothing returns nothing
local unit Caster = GetTriggerUnit()
local unit DummyUnit
local location CasterLoc = GetUnitLoc(Caster)
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set DummyUnit = CreateUnitAtLoc( GetOwningPlayer(Caster), 'h000' ,CasterLoc, 270.00 )
call UnitAddAbilityBJ( 'A001', DummyUnit )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', DummyUnit )
set udg_PolarPoint = PolarProjectionBJ(CasterLoc, 200.00, ( 45.00 * I2R(GetForLoopIndexA()) ))
call IssuePointOrderLocBJ( DummyUnit, "breathoffire", udg_PolarPoint )
call RemoveLocation(udg_PolarPoint)
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveLocation(CasterLoc)
set Caster = null
set DummyUnit = null
endfunction
//===========================================================================
function InitTrig_Fire_Nova takes nothing returns nothing
set gg_trg_Fire_Nova = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fire_Nova, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Fire_Nova, Condition( function Trig_Fire_Nova_Conditions ) )
call TriggerAddAction( gg_trg_Fire_Nova, function Trig_Fire_Nova_Actions )
endfunction
It works in game though, if you know how to set the PolarPoint variable to a local variable please tell me how.
JASS:
set udg_PolarPoint = PolarProjectionBJ(CasterLoc, 200.00, ( 45.00 * I2R(GetForLoopIndexA()) ))