EdgeOfChaos
E
EdgeOfChaos
This is my current code:
DUMMY is a constant integer for the unit type of my dummy.
toAdd is the ability ID (for this a custom storm bolt)
Target is the unit to apply it to.
I'm trying to use it to cast a custom storm bolt. I made the dummy visible and belong to me for the test, and it is being created correctly, and the ability is being added. It just won't cast it. What am I doing wrong here?
(and no, it's not something like mana cost or cast range, I checked both of those. I can cast the ability manually OK from the dummy, it's just the trigger that won't use it.)
JASS:
function applyEffect takes unit target, integer toAdd returns nothing
local unit dummy = CreateUnit(Player(0),DUMMY,GetUnitX(target),GetUnitY(target),0)
call UnitAddAbility(dummy,toAdd)
call IssueTargetOrderById(dummy,toAdd,target)
call UnitApplyTimedLife(dummy,'BTLF',1.0)
endfunction
DUMMY is a constant integer for the unit type of my dummy.
toAdd is the ability ID (for this a custom storm bolt)
Target is the unit to apply it to.
I'm trying to use it to cast a custom storm bolt. I made the dummy visible and belong to me for the test, and it is being created correctly, and the ability is being added. It just won't cast it. What am I doing wrong here?
(and no, it's not something like mana cost or cast range, I checked both of those. I can cast the ability manually OK from the dummy, it's just the trigger that won't use it.)