• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Item in shop sells to specific Unit

Status
Not open for further replies.
Level 1
Joined
Feb 21, 2020
Messages
5
Hello,
what is the best way to trigger a item shop that sells Item A to Hero A for example Arthas (but not to Hero B)
and Item B to Hero B for example Uther (but not to Hero A) ?
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
  • Sell Item to Specific Unit
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Crown of kings +5
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Buying unit) Not equal to Arthas
        • Then - Actions
          • Item - Remove (Sold Item)
          • Player - Add 1000 to (Owner of (Buying unit)) Current Gold
        • Else - Actions
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,013
Yes because it probably doesn't have the item until the thread ends (could be achieved by executefunc or 0.00 timer) so there's no matching item then. The event responses refer to the item directly rather than trying to find a matching one, so they work regardless of whether or not the unit has the item.
 
Status
Not open for further replies.
Top