IAmSoDoomed
New Member
- Reaction score
- 0
Hi, I'm new to JASS and, I tried to script something and everything works, besides one thing and I'm not sure which one it is.
I guess it's
either a problem with the Unit Group
or a problem with adding the abillity
The skill itself, shoots out a wave of fire to the front and is supposed to add an ability to the units, inside of the AoE. Just that it doesn't add the Ability to the target unit.
I guess it's
either a problem with the Unit Group
or a problem with adding the abillity
Code:
function Trig_Fire_Burst_Conditions takes nothing returns boolean
if (not( GetSpellAbilityId() == 'A000' )) then
return false
endif
return true
endfunction
//========================================================================================================================================================================================================================================================
function Trig_Fire_Burst_FuncCon takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
//========================================================================================================================================================================================================================================================
function Trig_Fire_Burst_FuncAct takes nothing returns nothing
call UnitAddAbilityBJ( 'A001', GetEnumUnit() )
endfunction
//========================================================================================================================================================================================================================================================
function Trig_Fire_Burst_Actions takes nothing returns nothing
local unit Triggering_Unit = GetTriggerUnit()
local location Caster_Location = GetUnitLoc( Triggering_Unit )
local integer Index = 1
local integer IndexEnd = 10
call TriggerSleepAction( 0.18 )
loop
exitwhen Index > IndexEnd
call AddSpecialEffectLocBJ(PolarProjectionBJ(Caster_Location,(50.00 * Index),GetUnitFacing(Triggering_Unit)), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl")
call TriggerSleepAction( 0.01 )
call UnitDamagePointLoc(Triggering_Unit,0,40,PolarProjectionBJ(Caster_Location,(50 * Index),GetUnitFacing(Triggering_Unit)),100,ATTACK_TYPE_MAGIC,DAMAGE_TYPE_MAGIC)
call ForGroupBJ( GetUnitsInRangeOfLocMatching(30.00, PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), ( 50.00 * 10.00 ), GetUnitFacing(GetTriggerUnit())), Condition(function Trig_Fire_Burst_FuncCon)), function Trig_Fire_Burst_FuncAct )
set Index = Index + 1
endloop
call RemoveLocation(Caster_Location)
endfunction
//========================================================================================================================================================================================================================================================
function InitTrig_Fire_Burst takes nothing returns nothing
set gg_trg_Fire_Burst = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_Fire_Burst, EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition( gg_trg_Fire_Burst, Condition( function Trig_Fire_Burst_Conditions ) )
call TriggerAddAction( gg_trg_Fire_Burst, function Trig_Fire_Burst_Actions )
endfunction
The skill itself, shoots out a wave of fire to the front and is supposed to add an ability to the units, inside of the AoE. Just that it doesn't add the Ability to the target unit.