Carnerox
The one and only.
- Reaction score
- 84
At the moment my fire nova spell is a very simple stun all units and deal damage, but it's a very boring spell. So is there anyway i can improve the idea of the spell and maybe the code?
Thanks! :thup:
JASS:
function Trig_FB_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A00F039; //Rawcode.
endfunction
function Trig_FB_Actions takes nothing returns nothing
local unit c = GetTriggerUnit() //Caster
local unit d
local location tp = GetUnitLoc(c) //Postion of Caster.
local location sp
local integer start = 1
local integer end = 36
loop
exitwhen start > end
call CreateNUnitsAtLoc( 1, 039;h009039;, GetOwningPlayer(c), tp, GetUnitFacing(c))
set d = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ (2.00, 039;BTLF039;, d)
call UnitAddAbilityBJ (039;A00H039;, d)
call SetUnitAbilityLevelSwapped (039;A00H039;, d, GetUnitAbilityLevelSwapped (039;A00F039;, c))
set sp = PolarProjectionBJ (tp, GetUnitFacing(c), (I2R(start) * 10.00)) //Points that dummy units will fire the nova.
call IssuePointOrderLoc (d, "carrionswarm", PolarProjectionBJ(tp, 200.00, ((start) * 70.00 )))
call RemoveLocation (sp)
set start = start + 1
endloop
//Removing leaks and nulling caster/dummy unit.
call RemoveLocation (tp)
set c = null
set d = null
endfunction
//===========================================================================
function InitTrig_FireBlast takes nothing returns nothing
local trigger Fireblast = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ (Fireblast, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition (Fireblast, Condition( function Trig_FB_Conditions))
call TriggerAddAction (Fireblast, function Trig_FB_Actions)
endfunction
Thanks! :thup: