Vending Machines are very useful and a very common staple in Gimkit, but they have one problem: the price cannot change. This guide will fix that.
Warning
This is not an actual vending machine, but rather a button or game overlay that does this. Also, I will be discussing COMPUTER-GENERATED prices in this.
Concept
This will use an item granter to check if the player has more than the property amount of the item they need. If they do, then it will subtract that amount and broadcast on the channel that will either give them something or give an item.
Guide
So first, set a price property. Its default should be the 1st price you need. Set this to broadcast a change on game start. After this, make a button broadcast on “Buy”. Make a block in the item granter (when receiving on “Buy”) that checks if you have enough of the item by using a greater than or equal to comparison. In the case that it is true, use concatenation to broadcast on the correct channel, and THEN update the price using the algorithm you are using to generate the price. After this, make a text device. Make a block that is for receiving on the channel that the property broadcasts on. Make it set the text to the value of the property in the block.
And there it is! You now have a store with varying prices!
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11