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?
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),039;hfoo039;,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