One Item per Shop

rotten

New Member
Reaction score
2
No answers on hero abilities? Ok, here's another one for you.

If a unit buys an item from a shop, how do I prohibit its owner, but NOT other players, from buying other items from that shop?
 
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.
 
umm u know that if some1 selects it then it becomes available to you aswel if ur still selecting it according to your method?
 
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
          • Item - Remove (Last dropped item)


hopefully this may help you with your problem
 
"Set itembrought[(Player number of (Triggering player))] = True"

This is an array variable, correct? :eek:
 
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.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top