• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Detect item ability issued order

Level 3
Joined
May 7, 2020
Messages
15
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 19
Joined
Feb 27, 2019
Messages
590
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
 
Top