Dummy don't cast spells on a point

Magoiche

Member
Reaction score
20
I had this problem 3 times now.
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
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Put some BJDebugMsg.
Make sure that GetUnitAbilityLevel( Caster, 'A00D' )>= 1, and enough high
 

Magoiche

Member
Reaction score
20
I already put it.
And as i say.
It runs everything in the trigger.
The dummy just don't cast the spell.
The spell level is ok too.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Try to move the dummy on an other place before casting the spell, check again the conditions for the spell in the object editor, check if the functions UnitAddAbility and IssuePointOrder returns true.
 

Magoiche

Member
Reaction score
20
Lets see.
Moving the unit don't made it work.
The unit get the spell and the level of it is okay.
Everythuing fien in the object editor.
The problem is with the IssuePointOrder.
But i don't know what is it.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
unit owner is a computer ?
If it is, try with a neutral player, i've already read issues with using a computer player.
 

Magoiche

Member
Reaction score
20
No need anymore.
I just ordered to the dummy to use a spell that summons a unit.
Then i just put the trigger to summon the right unit.
=D

+rep for you for trying to help
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top