1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. The SharpCraft World Editor Extended (WEX) has been updated for the latest Warcraft 3 version: Download.
    Dismiss Notice
  3. Join Music Contest #7 - Location! Craft a song that depicts any place.
    Dismiss Notice
  4. The Paired Modeling/Texturing Contest #3 - Leaders has begun! Artists group up and struggle! May the best team lead the run.
    Dismiss Notice
  5. 'The Icon Contest #15 has started and Melee units await for their new abilities!
    Dismiss Notice
  6. Advanced Tech-tree contest #1 poll! Cast your vote now!
    Dismiss Notice
  7. 'The gothic theme has yielded great textures! Come and check out the results for the 26th texturing 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,749
    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,749
    Target item of issued order. didnt see that lol