HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

GetAbilityId? Somehow?

07-27-2006, 09:25 PM#1
The)TideHunter(
How can i get the Order ID of an ability? iv tried a few things but they dont seem to work.
Theres no GetAbilityOrderId or anything =/
07-27-2006, 10:03 PM#2
shadow1500
You can't get the order of an ability. However you can set the art effect to the order string and then use GetAbilityEffectById to get the order. Actualy you can store any type of data in an ability, you can even add those art fields to other object types by modifying UnitMetaData.slk.
07-27-2006, 10:04 PM#3
Captain Griffen
You could also do it manually via game cache.
07-27-2006, 11:23 PM#4
The)TideHunter(
The thing is, i cant attach or do something like that, because i dont know the ID in the first place, thats what im trying to get, i dont actually need a function that gets it, well i do, but not in my map, its just to test and get the value.
I need a unit to cast an ability, and its refusing to cast it by order string, so im using ID, but i cant get the ID for it.
Suggestions?
07-28-2006, 05:49 AM#5
BertTheJasser
Collapse JASS:
function OrderCheck_Actions takes nothing returns nothing
local integer o=GetIssuedOrderId()
if IsUnitSelected(GetTriggerUnit(),Player(0)) then
    call DisplayTimedTextToPlayer(GetLocalPlayer(),0.00,0.00,60.00,"|cff009933"+I2S(o)+OrderId2String(o)+"|r")
endif
endfunction

//===========================================================================
function InitTrig_OrderCheck takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=0
loop
   call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null)
   call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_ISSUED_ORDER,null)
   call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
   set i=i+1
   exitwhen i>15
endloop
call TriggerAddAction(t,function OrderCheck_Actions )
set t=null
endfunction
This func tells you whenever a selected unit by player 0 red is issued an order. You further just need to place athe unit with the ability and order it manualy, the orderstring and the order id appear, write down somewhere and place as order id whereever you want.

Alternative: DL Warcraft III Utility Pack
07-28-2006, 06:07 AM#6
Fin.
Someone posted a list of em I think here

http://www.wc3campaigns.net/showthread.php?t=85608
07-28-2006, 10:29 AM#7
The)TideHunter(
Quote:
Originally Posted by BertTheJasser
Collapse JASS:
function OrderCheck_Actions takes nothing returns nothing
local integer o=GetIssuedOrderId()
if IsUnitSelected(GetTriggerUnit(),Player(0)) then
    call DisplayTimedTextToPlayer(GetLocalPlayer(),0.00,0.00,60.00,"|cff009933"+I2S(o)+OrderId2String(o)+"|r")
endif
endfunction

//===========================================================================
function InitTrig_OrderCheck takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=0
loop
   call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null)
   call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_ISSUED_ORDER,null)
   call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
   set i=i+1
   exitwhen i>15
endloop
call TriggerAddAction(t,function OrderCheck_Actions )
set t=null
endfunction
This func tells you whenever a selected unit by player 0 red is issued an order. You further just need to place athe unit with the ability and order it manualy, the orderstring and the order id appear, write down somewhere and place as order id whereever you want.

Alternative: DL Warcraft III Utility Pack

But the thing is with that, variable o is = GetIssuedOrderId(). And thats what i used, GetIssuedOrderId(). It dosent count for abilities, just the usual "stop", "holdposition", "attack" etc.
I'll have a more of a fiddle, but i really need this doing =/.
07-28-2006, 01:03 PM#8
Vexorian
Quote:
GetIssuedOrderId(). It dosent count for abilities, just the usual "stop", "holdposition", "attack" etc.

Nope, it works for abilities, seriously, it does.
07-28-2006, 01:50 PM#9
The)TideHunter(
I just tried, can you give me a working example? All the things im trying just display nothing when i debugmessage it.
07-28-2006, 07:04 PM#10
Vexorian
Order unit to cast blizzard

in a point order event have call BJDebugMsg(I2S(GetIssuedOrderId()))

that shows blizzard's orderid.
08-14-2006, 08:18 AM#11
BertTheJasser
It works seriously 100%. You can exclude the standard orders attack,smart,move,patrol,holdposition, attckground,attackonce and the 6 itemdroporders.
08-14-2006, 10:16 AM#12
The)TideHunter(
Ah k, its not a big deal now, because the order string is working...
This thread is pretty old now though =/.