• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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,034
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