- Joined
- Jul 14, 2007
- Messages
- 34
Let's see here. . . I was looking at Vexorian's and other's nova templates and systems, but I'm probably only going to have one nova type spell in my map so I started trying to make a little bit simpler way (I'm new to JASS) and kinda cheat my way through instead of using one of their systems/templates. The problem is instead of coming up in a complete circle around the caster, it doubles up on the top half of the circle and shoots only one (at what looks like 270 degrees) down. Here's the trigger:
The two methods I tried I turned into comments so I could alternate and see the difference, between these two there isn't any; dunno why I thought there would be.
General cleanup of my code would also be appreciated.
JASS:
function Trig_GammaRayBurst_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00E'
endfunction
function Trig_GammaRayBurst_Actions takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer l=GetUnitAbilityLevel(u,'A00E')
local integer n=1
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local player p=GetOwningPlayer(u)
local unit d
loop
exitwhen n > 10
set d= CreateUnit(p,'e005',x,y,bj_UNIT_FACING)
call SetUnitAbilityLevelSwapped('A00K',d,l)
//call IssuePointOrder(d,"breathoffrost",(x+(Cos(Deg2Rad(36*n))*100.00)), (y+Sin(Deg2Rad(36*n))*100.00))
//call IssuePointOrderLoc(d,"breathoffrost",PolarProjectionBJ(GetUnitLoc(u), 100.00 , ( 36.00 * n )) )
call UnitApplyTimedLife(d,'BTLF',1.00)
set n= n + 1
endloop
set u=null
set p=null
set d=null
endfunction
//===========================================================================
function InitTrig_GammaRayBurst takes nothing returns nothing
set gg_trg_GammaRayBurst = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_GammaRayBurst, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_GammaRayBurst, Condition( function Trig_GammaRayBurst_Conditions ) )
call TriggerAddAction( gg_trg_GammaRayBurst, function Trig_GammaRayBurst_Actions )
endfunction
The two methods I tried I turned into comments so I could alternate and see the difference, between these two there isn't any; dunno why I thought there would be.
General cleanup of my code would also be appreciated.