- Joined
- Nov 20, 2010
- Messages
- 5
So yeah, I'm new to JASS and tried making my own spell from the JASS tutorial by wyrmlord ( Beginning JASS Tutorial Series - wyrmlord). There's only one trigger and I think it's a very simple spell. Hope you can help and tell me whats wrong.
Please help
JASS:
function Burning_Soul_Conditions takes nothing returns boolean
return GetSpellAbilityId == 'ABSS'
endfunction
function Burning_Soul_Actions takes nothing returns nothing
local unit Caster
local integer i_1
local location Temp_Loc_1
local location Temp_Loc_2
local location Temp_Loc_3
local unit Effect_1
local unit Effect_2
set Caster = GetSpellAbilityUnit()
set Temp_Loc_1 = GetSpellTargetLoc()
set Temp_Loc_2 = PolarProjectionBJ(Temp_Loc_1, 300.00, 0.00)
set Temp_Loc_3 = PolarProjectionBJ(Temp_Loc_1, 300.00, 180.00)
set Effect_1 = CreateUnitAtLoc(GetOwningPlayer(Caster), 'hBSS', Temp_Loc_2, 0.00)
set Effect_2 = CreateUnitAtLoc(GetOwningPlayer(Caster), 'hBSS', Temp_Loc_3, 0.00)
loop
exitwhen i_1 == 36
set Temp_Loc_2 = PolarProjectionBJ(Temp_Loc_1, 300.00, (0.00 - (10.00 * i_1)))
set Temp_Loc_3 = PolarProjectionBJ(Temp_Loc_1, 300.00, (180.00 - (10.00 * i_1)))
call SetUnitPositionLoc(Effect_1, Temp_Loc_2)
call SetUnitPositionLoc(Effect_2, Temp_Loc_3)
call RemoveLocation(Temp_Loc_2)
call RemoveLocation(Temp_Loc_3)
set i_1 = i_1 + 1
endloop
call KillUnit(Effect_1)
call KillUnit(Effect_2)
set Caster = null
set Effect_1 = null
set Effect_2 = null
endfunction
function Init_Trigger_Burning_Soul takes nothing returns nothing
local trigger gg_trg_Burning_Soul
local integer i
set i = 0
loop
exitwhen i == 15
call TriggerRegisterPlayerUnitEvent(gg_trg_Burning_Soul, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set i = i + 1
endloop
call TriggerAddCondition(gg_trg_Burning_Soul, Condition(function Burning_Soul_Conditions))
call TriggerAddAction(gg_trg_Burning_Soul, function Burning_Soul_Actions
endfunction
//--'hBSS' is the dummy unit which has Immolate(Passive) and deals damage
//--'ABSS' is the spell based on standard wc3 shockwave
//-- What the spell does (or should do) is to create 2 flames (dummy units) and rotate them around the target point.
Please help

Last edited: