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:
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.
JASS:
library Conditions requires TimerUtils
globals
private constant integer BLEED_ID = 039;B001039;
private constant integer BLEED_SPELL = 039;A004039;
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, 039;Acri039;, t)) then
debug call BJDebugMsg("BleedDuration: successful")
else
debug call BJDebugMsg("BleedDuration: unsuccessful")
endif
call UnitApplyTimedLife(dum, 039;0000039;, .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.