I had this problem 3 times now.
The other 2 i just changed somethings but now i need it.
The dummy have mana to cast.
The mana cost of the spell is 0.
The orderid its right.
Everything in the trigger is fine.
But the dummy just don't cast the spell.
Why? T.T
The other 2 i just changed somethings but now i need it.
JASS:
scope Wild initializer Initial
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00D'
endfunction
private function Actions takes nothing returns nothing
local unit Caster = GetTriggerUnit()
local real x = GetUnitX( Caster )
local real y = GetUnitY( Caster )
local real CastX
local real CastY
local real CastAngle
local unit Dummy
local integer LoopAIndex = 0
loop
exitwhen LoopAIndex > 4
set CastAngle = GetRandomReal( 0.0 , 360.0 )
set Dummy = CreateUnit( GetOwningPlayer( Caster ), 'u001', x, y, 0.0 )
set CastX = x + 50 * Cos( CastAngle * 3.14159 / 180.0 )
set CastY = y + 50 * Sin( CastAngle * 3.14159 / 180.0 )
call UnitApplyTimedLife( Dummy, 'BFTL', 10 * GetUnitAbilityLevel( Caster, 'A00D' ) )
call UnitAddAbility( Dummy, 'A00E' )
call SetUnitAbilityLevel( Dummy, 'A00E', GetUnitAbilityLevel( Caster, 'A00D' ) )
call IssuePointOrder( Dummy, "shockwave", CastX, CastY )
set LoopAIndex = LoopAIndex + 1
endloop
set Caster = null
set Dummy = null
endfunction
private function Initial takes nothing returns nothing
local trigger trig = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( trig, Condition( function Conditions ) )
call TriggerAddAction( trig, function Actions )
set trig = null
endfunction
endscope
The dummy have mana to cast.
The mana cost of the spell is 0.
The orderid its right.
Everything in the trigger is fine.
But the dummy just don't cast the spell.
Why? T.T