Hmm, I've got an idea, but it might be a bit bizzare..
What I'm thinking is that you've got what only LOOKS like a shop, and when a player selects it, a trigger changes their selection to a dummy in the same position of the shop which is actually what sells the item.
If you do this, you can simply add conditions to the trigger, and therefore when a player clicks it simply don't select the dummy shop for them.
Unfortunately this will have a small delay between when the player selects the real shop, and when the trigger selects the dummy shop for the player, which I don't know how to avoid.
I'm sure there's a better way out there somewhere, however since nobody is posting replies for ya I've done my best =(
Hope it helps, good luck.
Erm....it is a lot more easier to stop players from buying the same item( jus use unit aquired item event and condition on the amount of 'you item' and the buying item is 'your item'.... but the player will still be able to see the item in the shop though.
Seeing the items in the shop is irrelevant, and they can only get one of each kind already. The items have a 3 minute replenish time with maximum stock of one, and the players are kicked out of that area after 3 minutes if their selection isn't finished.
What this does is also prevent OTHER players from taking that one item.
This is just an additional limitation I want to use.
Bakil: Maybe if I made a trigger that removes the shop from player selection altogether if he's bought an item from it? That's a little complicated, I may not even know how to do it with multiple players.
I'm not exactly sure what it is you want, but from what i can make out you want a shop that can only be used once by a player.
With this in mind, i think perhaps a trigger using a "unit aquires item" trigger consisting of a if... then...else statement.
this is a basic trigger, but only works with the marketplace units(items will have to be added via a trigger) but the gereral idea is you buy an item it sets the variable, and the next item you buy gets removed. (note it deosnt refund the gold)
Trigger:
shop
Events
Unit - A unit Sells an item (from shop)
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Selling unit) Equal to Marketplace 0003 <gen>
itembrought[(Player number of (Triggering player))] Equal to False
Then - Actions
Set itembrought[(Player number of (Triggering player))] = True
Else - Actions
Hero - Drop (Sold Item) from (Triggering unit)
Neutral Building - Remove (Item-type of (Sold Item)) from (Selling unit)
Wait 0.01 seconds
Neutral Building - Add (Item-type of (Last dropped item)) to (Selling unit) with 1 in stock and a max stock of 1
Yes, it is, also to make the trigger work the with the goblin merchant unit you need to give it the sell item ability. the basic trigger still doesn't refund the gold when it removes the item, and i think in its current form will only work properly for the shop specified in the conditions
Other ideas I can think of is prohibit purchase of another item:
1) UNTIL the item the hero has is either sold/lost/dropped(dropping will be abuse, as you will be able to drop, buy, pick up and only make the buying process a little longer) but you can solve this simply through checking in item options that Item cannot be dropped or sold to merchants.
2) UNTIL a timer expires. This can be in sort of way, cooldown purchasing items. You buy an item, and you cannot buy another until your "cooldown" is over.
3) UNTIL ever. It involves checking whether the hero bought from this shop or that shop and setting a boolean variable permanently false/true depending what you state in it. Example Bought_ItemShop[Value of Shop] = True. This is your original idea, but doesn't it sound a little overboard to buy one item and never be allowed to buy another from the same shop again?
The shops in question sell items that represent custom hero skills. Each shop contains a type of skills, such as single target damage spells, auras or magic ultimates.
I don't want players to just pick finger of pain - air spear - magic hammer - mental shock - finger of death.
The first four in this list are all in the single target damage spells shop and the last is an ultimate. Put together they would do about 3000 damage in a map where the biggest HP pools will be around that number, maybe. Without items, I've got a Flesh Golem hero which goes to about 2000 at maximum level (25). On the other hand, a simple anti-magic potion will ruin it.
Very naive players might also pick 5 channeling skills :nuts:
I think it's enough that people can take Finger of Pain (highest non-ult damage) and Finger of Death (highest ult damage) back to back, giving a 2240 magic damage combo (1680 to hero armor) at maximum levels, for 770 mana (more than many heroes in my map will even have).
Edit: Right now I'm still building the abilities and shops, and I'm barely halfway done (they're a damn lot, will be about 500 including engineering upgrades, spell books and secondary abilities). I may or may not try to introduce the one per shop limit before I finish them all.
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.