This tutorial will help you make a shop where you can upgrade weapons like the zapper or quantum portal.
Note: The tutorial is mainly for weapons to be upgraded. When I say to make four of something, I really mean the amount of upgrades you will have.
- Make the shop
First, put down a vending machine. Right now, you can either decide to make the vending machine custom or not. If you want it to be custom, you can make it hidden and then put a prop over it. If not, make sure it is visible, and select the image of the item you are upgrading.
Next, select the currency you will be using (i.e. cash) to be transacted for an upgrade. Make sure the transaction mode of your vending machine is “Transmit on channel.”
- Item Timers
This upgrader is meant to upgrade only starter weapons. Place down a starting inventory circuit and then select the lowest tier of your item.
How many upgrades are you going to make? A normal weapon has 5 tiers, so it will be upgraded 4 times (common->uncommon, uncommon->rare, rare->epic,
epic->legendary). Since it is being upgraded 4 times, we will place down 4 timers. If you upgrade a different amount of times, change the amount of timers. Now, make sure the timers all are not visible to the player. Also, make sure that the timers are only applying to that one player, not the entire server by selecting “player” under count scope.
Now we need to add targets to the timers. The first timer should have a target of 1, the second should have a target of 2, and so on. Wire the vending machine into the timers so that when an item is purchased, the timer will increase.
Note: You should always be checking if your wires are green. If they aren’t, then they haven’t been set up fully.
- Item Granting & Removing
Place down 4 wire repeaters above the timers. The wire repeaters should have a delay of 0.1 seconds. Next, place down 4 Item Granters. The item granters should be set to grant the next level upgrade. For instance, the first granter would give an uncommon, the second would give a rare, and so on.
Once you have those down, run wires from each timer into the wire repeater above them so that when the timer gets to its limit, the repeater will be activated. Then, run wires from each wire repeater into the granters, so that when the repeater is activated, the item will be granted. The reason we are doing all of this is so the item is given after the lower tier item is removed. This will make sure that the item is not in a different slot.
Finally, Create 4 Inventory Item Manager Make the inventory item managers track the item that is being upgraded (i.e. common when upgrading common item to uncommon). Run wires from the timers into the managers saying that when the timer hits its target, remove the item from the player’s inventory.
This is the end of the tutorial! Test your upgrader to see if it works! If you need any help, you can always ask in the comments below.