1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Mini-Mapping Contest #13 has started! Fitting the time of the year, Ghastly Realm was elected to be the contest theme!
    Dismiss Notice
  3. The first Team Hero Contest #8 has finished! Vote now for your favorite champions of the Tavern!
    Dismiss Notice
  4. Take part in the discussion for a new Zephyr contest.
    Dismiss Notice
  5. The fine experience with futuristic composition has brought us the winners! Take a look at the Results for the 5th Music Contest.
    Dismiss Notice
  6. 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,750
    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,750
    Target item of issued order. didnt see that lol