Detecting Cooldown

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Is there a GUI action that can detect if a ability is in cooldown or not? And if there isn't what is custom code or jass script to detect if a ability is in cool down?
 

Chocobo

White-Flower
Reaction score
409
Not tested.

JASS:
function OrderTest takes unit u, string order, string style returns boolean
    local boolean b=false
    local unit d
    if style=="point" then
        set b=IssuePointOrder(u,order,0.0,0.0)
        if b then
            call IssueImmediateOrder(u,"stop")
        endif
    endif
    if style=="target" then
        set d=CreateUnit(Player(13),'hfoo',0.0,0.0,0.0)
        set b=IssueTargetOrder(u,order,d)
        if b then
            call IssueImmediateOrder(u,"stop")
        endif
        call RemoveUnit(d)
        set d=null
    endif
    if style=="none" then
        set b=IssueImmediateOrder(u,order)
        if b then
            call IssueImmediateOrder(u,"stop")
        endif
    endif
    return b
endfunction



Requires the order of the ability.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top