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 The Helper:
    Happy Friday!
    +1
  • tom_mai78101 tom_mai78101:
    Starting this upcoming Thursday, I will be in Japan for 10 days.
  • tom_mai78101 tom_mai78101:
    Thursday - Friday will be my Japan arrival flight. 9 days later, on a Sunday, will be my return departure flight.
    +2
  • The Helper The Helper:
    Hope you have safe travels my friend!
    +1
  • vypur85 vypur85:
    Wow spring time in Japan is awesome. Enjoy!
  • The Helper The Helper:
    Hopefully it will be more pleasure than work
  • vypur85 vypur85:
    Recently tried out ChatGPT about WE triggering. Wow it's capable of giving a somewhat legitimate response.
  • The Helper The Helper:
    I am sure it has read all the info on the forums here
  • The Helper The Helper:
    i think triggering is just scripting and chatgpt is real good at code
  • vypur85 vypur85:
    Yeah I suppose so. It's interesting how it can explain in so much detail.
  • vypur85 vypur85:
    But yet it won't work.
  • The Helper The Helper:
    it does a bad ass job doing excel vba code it has leveled me up at my job when I deal with excel that is for sure
  • vypur85 vypur85:
    Nice! I love Excel coding as well. Has always been using Google to help me. Maybe I'll use ChatGPT next time when I need it.
  • The Helper The Helper:
    yeah whatever it puts out even if it is not perfect I can fix it and the latest version of chatgpt can create websites from pictures it will not be long until it can do that with almost all the tools
    +1
  • The Helper The Helper:
    These new Chat AI programs are going to change everything everyone better Buckle the Fuck Up!
  • The Helper The Helper:
    oh and Happy Tuesday Evening! :)
    +1
  • jonas jonas:
    Im worried they'll change things for worse
  • jonas jonas:
    A lot more low quality content, a lot more half-baked stuff.
  • jonas jonas:
    If you're good enough to spot the mistakes of the answers you don't need it in the first place. If you aren't good enough, you're gonna rely on some half-correct stuff
  • The Helper The Helper:
    the earlier AI is and has been used extensively for publishing news and other content for a while now
  • jonas jonas:
    I used to be active on quora, it's now flooded with extremely similar, superficial answers that often miss the point of the question
  • N NJJ:
    hi
  • N NJJ:
    Hello, gathering all my old accounts… :)
    +1

    The Helper Discord

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top