- Joined
- Apr 9, 2004
- Messages
- 1
The spell is casted on an unit, after that circles are created around the unit (each circle is bigger than the previous one)
the problem is, that the action
is not exectued, so the loop stops after the first sfx
the problem is, that the action
JASS:
call GroupAddUnitSimple( GetLastCreatedUnit(), dmgUnits)
JASS:
function Trig_HS_Stike_of_Light_JASS_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00J' ) ) then
return false
endif
return true
endfunction
function Trig_HS_Stike_of_Light_JASS_Func005002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "selfdestruct", GetUnitLoc(GetEnumUnit()) )
endfunction
function Trig_HS_Stike_of_Light_JASS_Actions takes nothing returns nothing
local integer spellLevel
local integer loopOuterIndex
local integer loopInnerIndex
local group dmgUnits
local location targetPoint
local unit caster
local effect array dmgEffects
set spellLevel = GetUnitAbilityLevelSwapped('A00J', GetSpellAbilityUnit())
set targetPoint = GetSpellTargetLoc()
set caster = GetSpellAbilityUnit()
set loopOuterIndex = 0
loop
exitwhen loopOuterIndex > 5
set loopInnerIndex = 0
loop
exitwhen loopInnerIndex > 8
call AddSpecialEffectLocBJ( PolarProjectionBJ(targetPoint, ( 50.00 * loopOuterIndex ), ( 40.00 * loopInnerIndex )), "Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl" )
set dmgEffects[( ( 9 * loopOuterIndex ) + loopInnerIndex )] = GetLastCreatedEffectBJ()
call CreateNUnitsAtLoc( 1, udg_E_HS_SoL_DmgEinheiten[spellLevel], GetOwningPlayer(caster), PolarProjectionBJ(targetPoint, ( 25.00 + ( I2R(loopOuterIndex) * 50.00 ) ), ( I2R(loopInnerIndex) * 40.00 )), bj_UNIT_FACING )
call GroupAddUnitSimple(GetLastCreatedUnit(),dmgUnits)
set loopInnerIndex = loopInnerIndex + 1
endloop
//call PolledWait( 0.00 )
set loopOuterIndex = loopOuterIndex + 1
endloop
call PolledWait( 0.20 )
call ForGroupBJ( dmgUnits, function Trig_HS_Stike_of_Light_JASS_Func005002 )
call GroupClear( dmgUnits )
call PolledWait( 1.00 )
set loopOuterIndex = 0
loop
exitwhen loopOuterIndex > 64
call DestroyEffectBJ( dmgEffects[loopOuterIndex] )
set loopOuterIndex = loopOuterIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_HS_Stike_of_Light_JASS takes nothing returns nothing
set gg_trg_HS_Stike_of_Light_JASS = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HS_Stike_of_Light_JASS, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_HS_Stike_of_Light_JASS, Condition( function Trig_HS_Stike_of_Light_JASS_Conditions ) )
call TriggerAddAction( gg_trg_HS_Stike_of_Light_JASS, function Trig_HS_Stike_of_Light_JASS_Actions )
endfunction