• 🏆 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!

Shop/Market question

Status
Not open for further replies.
Level 22
Joined
Feb 6, 2014
Messages
2,466
Hello hive!
Is it possible to disable a certain player from buying a certain item from shops? Example, after a player bought 5 of those items, he will no longer be able to buy it.
I tried re-adding gold and removing item at purchase but that decreases the stock in the shop. I tried increasing the stock via AddItemToStock but the tooltip colors is not there when I add items through triggers.
Any workaround?
 
Level 12
Joined
May 20, 2009
Messages
822
If all the players are enemies, you can just make them a bunch of invisible shops stacked ontop of each other, when a player selects the visible shop you make them automatically select one of the invisible shops. When a player purchases the max amount of allotted items, just get rid of their invisible shop,

If the players can be allies though, this won't work because they could just buy from another player's shop.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
You can alter the remaining stock of a single shop without any effect to others. Heck, you can even remove items from stock completely for them. Thus, giving each player their own shop lets you set the limits on a per-player basis.
 
Status
Not open for further replies.
Top