How to make a health/speed shop (Difficulty: đźź©)

In this tutorial, you will learn how to update stats using counters and vending machines using wires.

Step 1: Setting up the vending machine:

The vending machine should be outputting a signal, not an item. Set the price to whatever you want.

Make sure you are using limited stock! This will break if you arent! Set it to how many upgrades you want them to do. In this case I am using four, but you don’t have to. Just keep in mind, the more upgrades, the more work.

If you are planning on making a health increaser, you don’t have to read the rest of the instructions. All you have to do is set the max shield to whatever you want, and wire a health granter to the vending machine, so that when you purchase from the machine, it grants you shield. Now, speed modifiers are very different. If you are making one of those, or something similar, continue reading.

Step 2: Making the counters

Create an array of counters. The amount of counters should be the same as the amount of upgrades you want. The counters should only update for the player, and they shouldn’t be visible in game.

Next, connect wires from the vending machine to the counters, so that when there is a purchase, the counter increases.

The counters should have targets. Each counter will have a progressively higher target. In this case, it is from 1 to 4. This makes it so that when the counter increases, one of the counters will output a signal, and only that one. Also, the counter should start at 0

Step 3: Making the modifiers

Place down your speed modifiers and wire them up to their respective counter, so that when the counter reaches its target, it will set the current speed.

The modifiers need to update to a specific value. In my case, I have 4 modifiers, so I should set the modifier activated by the first counter, to the lowest speed value. The next modifier should be higher, and so on.

You may be wondering why we need this complex system. Well, speed modifiers can only set speed, not change it. They also can’t be changed by properties or counters, so those are out the window. These counters are important because they will activate sequentially, allowing the speed to set as if it was adding.

And that should be all! If you test it, when you upgrade the ability using the vending machine, it will actually increase the stat! Thanks for reading!

6 Likes

This is a great guide. Nice job

Nice guide! One thing: why not add an icon? Like icons/Speed?

Great use of pictures. Something I wish to see in every guide.

1 Like

Hey, you’re back! Nice guide, by the way.

2 Likes

I didn’t add that in the tutorial because it’s not really required. I could make a tutorial on how to use gimkit’s library of sprites to show others how to do it.

Nice guide, @JoeTheChicken! One thing I would do is change the Difficulty. :yellow_square: is meant to have some block code, but not much. On the other hand, this guide is fairly simple, so I would change it to 3/10, or :green_square:

1 Like

Welcome Back, @JoeTheChicken!

(I am crazy that no one even noticed he was active until may 30th.)

I set it to yellow because I thought it was just a bit more tedious than green. But I think its on the edge now that you’ve said that.

Maybe say 3-4/10 or :green_square:-:yellow_square:?

I literally said that.

can’t use more than 1 emoji

I did.

“Dora the explora :astonished:”
Also, bump!

I dont have the “use limited stock screen/ choice”.

look in the other tabs of the vending machine

1 Like

bump
(10 months is wild)

1 Like

Wait i joined 10 months ago?
time flies…

1 Like

wish we could turn back time… to the good ol’ days…