Dummy Unit not casting

Light Alkmst

New Member
Reaction score
20
There's a trouble I'm having with a trigger of mine, and I know the trouble is somewhere in here:

JASS:

library Conditions requires TimerUtils
    globals
        private constant integer BLEED_ID = 'B001'
        private constant integer BLEED_SPELL = 'A004'
        private constant real BLEED_DAMAGE = 3.
    endglobals
        
    function BleedDuration takes unit u, unit t, integer dur returns nothing
        local unit dum = CreateUnit(GetOwningPlayer(u), DUMMY_ID, GetUnitX(t), GetUnitY(t), GetUnitFacing(t))
        
        call UnitAddAbility(dum, BLEED_SPELL)
        call SetUnitAbilityLevel(dum, BLEED_SPELL, dur)
        if (IssueTargetOrderById(dum, 'Acri', t)) then
            debug call BJDebugMsg("BleedDuration: successful")
        else
            debug call BJDebugMsg("BleedDuration: unsuccessful")
        endif
        call UnitApplyTimedLife(dum, '0000', .03)
    endfunction
endlibrary


No matter what I've done to the spell, it always shows the unsuccessful message. I've removed dependencies, tweaked the spell targets, reset to normal, tried both order IDs, and tried the IssueTargetOrder() function. The message and dummy unit show up, but it always says unsuccessful and the buff doesn't show up. :banghead: I do have other functions, but I am very sure they are irrelevant in this problem.
 

Faust

You can change this now in User CP.
Reaction score
123
'Acri'? I guess that is the spell's raw code.
However that is not what ID means. Id is a six digit code.
To get it, you have to bjdebugmsg(GetUnitCurrentOrderID) or something like that.
 

Light Alkmst

New Member
Reaction score
20
'Acri' is the raw code for the base cripple spell. The function takes an integer, so I'm pretty sure that's correct. I'm gonna go try it with the string function again.

EDIT: Fixed...for now...
I think I forgot to remove the tech items when I tested with the string function...
 

Faust

You can change this now in User CP.
Reaction score
123
The function takes an integer, so I'm pretty sure that's correct.


Well it really doesn't matter what you think or how sure you are, you are incorrect. It's a six digit order code as I said. Everything has that, even if you click open hero abilities button, or open a spellbook.
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
Faust is correct. "ById" means that it takes the order id, not the rawcode.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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