1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice
  3. After a long wait, the results for Terraining Contest #18 are finally out! Drop by and congratulate the winners!
    Dismiss Notice
  4. The poll for Concept Art Contest #9 is up! Cast your vote for your favourite entry!
    Dismiss Notice
  5. Hero Contest #8 is up and running! This time it's a joint contest between artists and coders. Go here for team matchmaking.
    Dismiss Notice
  6. Our first StarCraft contest, The Galaxy Terraining Contest #1 - World Wonders has started. Enter to show off your Galaxy Editor skills and win a custom rank icon among other things.
    Dismiss Notice
  7. Ever wanted to get your sets ready for fast texturing while still having fun? Now it is possible with our newest Mini-Texturing Contest.
    The Skeleton Units need your dire help!
    Dismiss Notice
  8. The poll for Techtree Contest #11 is up! Cast your vote for your favorite entry.
    Dismiss Notice
  9. Take part in a Futuristic musical experience with our very own Music Contest. The 5th edition has finally arrived after a long time.
    Dismiss Notice
  10. 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,745
    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:
    159
    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,745
    Target item of issued order. didnt see that lol