1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Group up and create a Warcraft hero based on a member of the Hive and win up to 100 rep and a rank icon. Enter the team contest now!
    Dismiss Notice
  3. The Music Contest #8 Results are out! Congratulate the creators of Hive's coolest soundtracks!
    Dismiss Notice
  4. Dismiss Notice
  5. The results for Mini-Mapping Contest #14 is up! Congratulate the winners here!
    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,751
    Resources:
    0
    Resources:
    0
    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
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Spells:
    1
    Resources:
    3
    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,751
    Resources:
    0
    Resources:
    0
    Target item of issued order. didnt see that lol