• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Detect item ability issued order

Status
Not open for further replies.
Level 4
Joined
May 7, 2020
Messages
24
Is there a way to detect issued order of ability (item) being used. I want to check when unit is issued order to use item, and in specific scenarios stop it, however event unit is issued an order targeting an object doesnt seem to fire for item's abilities.
 
Level 24
Joined
Feb 27, 2019
Messages
833
Most item abilities only have order ids and not string orders. The order id for using items in item slots are:
Slot 1: 852008
Slot 2: 852009
Slot 3: 852010
Slot 4: 852011
Slot 5: 852012
Slot 6: 852013
  • OrderId
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • Custom script: local integer orderId = GetIssuedOrderId()
      • Custom script: if orderId > 852007 and orderId < 852014 then
      • Custom script: set udg_Slot = orderId - 852007
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item carried by (Triggering unit) in slot Slot)) Equal to Wand of Illusion
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop.
        • Else - Actions
      • Custom script: endif
 
Status
Not open for further replies.
Top