Instant Cast Abilities Problems?

cleeezzz

The Undead Ranger.
Reaction score
268
ok i dont know if its just me but when i triggered a unit to use Windwalk or beserk, it never canceled its current order. But now it does?

JASS:
library DelayedMeld requires KT

struct DMS
    unit u
    method onDestroy takes nothing returns nothing
        set .u = null
    endmethod
endstruct

private function Fade takes nothing returns boolean
    local DMS d = KT_GetData()
    if GetUnitState( d.u, UNIT_STATE_LIFE) < .405 then
        call d.destroy()
        return true
    endif
    call SetPlayerAbilityAvailable(GetOwningPlayer(d.u), 'A016', true)
    call IssueImmediateOrder(d.u, "windwalk") // I commented out this line and this line is definitely the problem.
    call SetPlayerAbilityAvailable(GetOwningPlayer(d.u), 'A016', false)
    call SetUnitPathing(d.u, false)
    call d.destroy()
    return true
endfunction

function UnitDelayedMeld takes unit u, real delay returns nothing
    local DMS d = DMS.create()
    set d.u = u
    call KT_Add(function Fade,d,delay)
endfunction

endlibrary


heres one example that USED to work, basically it just waits a specified time and orders the unit to WW.

when i click ww on the unit however, it does not interrupt the order.
 

ZugZugZealot

New Member
Reaction score
33
That's just how the abilities work. You'll have to add an additional order to tell them to stop, if that's the kind of effect you want. Also, Roar and the self-movespeed buff ability are like that as well.
 

cleeezzz

The Undead Ranger.
Reaction score
268
no read it again, im saying the trigger cancels the units order even though when i cast it on the unit myself, it doesn't cancel orders.

i WANT the trigger to NOT cancel the orders but right now its canceling it

and as i said, the trigger didn't interrupt the unit order in the past (might be the wc3 patches). this is an old trigger that ive recently found a problem with.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Hmmm... Could this be related to my question here?

If there's any way someone could revert their WC3 version (or if someone has an old version) and try this, I'd be curious for confirmation whether the behavior changed.
 

cleeezzz

The Undead Ranger.
Reaction score
268
bump, anyone know how to order the unit to use the spell without canceling order?
 

cleeezzz

The Undead Ranger.
Reaction score
268
what does that do o_O, (i want it so that if it was moving, it wouldn't stop moving)
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
ForceUIKey basically triggers an action as if the user hit a key. Maybe selecting the unit and using ForceUIKey with the hotkey for your Windwalk ability would be like having the player command the unit to activate Windwalk, and wouldn't interrupt it.
 
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