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?
 

BAkil

New Member
Reaction score
9
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.
 

Inflicted

Currently inactive
Reaction score
63
umm u know that if some1 selects it then it becomes available to you aswel if ur still selecting it according to your method?
 

0WN3D

New Member
Reaction score
15
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.
 

rotten

New Member
Reaction score
2
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.
 

KJP

New Member
Reaction score
5
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
 

rotten

New Member
Reaction score
2
"Set itembrought[(Player number of (Triggering player))] = True"

This is an array variable, correct? :eek:
 

KJP

New Member
Reaction score
5
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
 

sentrywiz

New Member
Reaction score
25
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?
 

rotten

New Member
Reaction score
2
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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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