1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. The apocalyptic vibes have reached their ends. Check out the Results for the 6th Music Contest!
    Dismiss Notice
  3. Our WC3 heroes were given companions! Cast your vote and decide who should win at the poll to the Modeling Mini-Contest #5 - Familiar!
    Dismiss Notice
  4. The Gothic has taken over at long last! Take part in the 26th Texturing Contest to see if you've still got the mettle for it.
    Dismiss Notice
  5. Choose a model and craft your spell in Zephyr Contest #15!
    Dismiss Notice
  6. Compete in Concept Art Contest - Bounty Hunter. May the best artist's bounty hunter execute!
    Dismiss Notice
  7. Looking to expand an altered melee race of yours? Join the Advanced Techtree Contest - Recycle, Revise, Reinvent contest!
    Dismiss Notice

[Solved] Target of order?

Discussion in 'Triggers & Scripts' started by Arhowk, Apr 16, 2012.

  1. Arhowk

    Arhowk
    Joined:
    Aug 8, 2007
    Messages:
    2,747
    Event - Any unit is issued an order targeting an object

    -> Is there a way to return the item that the unit was issued to pickup?

    long story short, im working out the bugs of a localized item system and one of the bugs is that if someone tries to pickup an item but has a full inventory than it will desync
     
  2. KnnO

    KnnO
    Joined:
    Sep 18, 2011
    Messages:
    158
    Probably you can use:

    Event
    • Unit - A unit Is issued an order targeting an object


    Condition:
    • (Target item of issued order) isn't No item

    Then

    • Item - Show (Target item of issued order)

    Code (vJASS):
    set udg_tmpItem  =  GetOrderTargetItem()

    Maybe that's what you want?

    I thought of a similar item system which checks if the unit is within a range of the item, so they will check what does the hero have and try to build something based on a recipe rule.
     
  3. Arhowk

    Arhowk
    Joined:
    Aug 8, 2007
    Messages:
    2,747
    Target item of issued order. didnt see that lol