I realized I needed to make a new guide, I WAS OVERDUE
so I thought of this:
A merging system for a game!
Why is this considered more complex?
As I was making this guide,
I figured that there was a more simple version to this, but I continued to stick with this.
OK LET’S GET INTO THE GUIDE.
-
Place a text device down. You can mark its position with terrain (like mud!) and put the terrain around the text device. Set its initial text to “?” and make it invisible on Game Start.
Don’t forget to make it player-scoped. Set it to show on “ShowText1” and hide on “HideText1” -
Create a property named “SlotRarityIndex.1” and put it near the text device. (you can abbreviate it if you want) Set it to a number property, text just makes it more complicated.
EXTRA INFO!!!
Here are the following rarity and number counterparts we will follow along with a square emoji:
- 0 = Empty and “?”
- 1= Common and
- 2 = Uncommon and
-
Open the text device and begin to write some block code inside it, the block code will determine what the text device’s text will be.
-
Begin to construct a trigger loop that begins on game start, set the ideal trigger channel to “ContentUpdate” and make sure the trigger is both invisible and cannot be triggered when stepped on. Then create a property named “PlayersHeldRarityIndex” and make the property player scoped.
EXTRA INFO!!!
The trigger loop WILL require an interval in order to work, try using “0.01” as the interval.
- Add a button device and do not change its button message, make the button invisible, proceed to wire the button to the text device as follows:
Button pressed --> Run wire pulse block
Now create a new block for the text device:
- Simply copy the property, button, and text device somewhere else like another mud mark.
Rewire the button and text device shown in step 5. Now rename the copy of the original property to “SlotRarityIndex.2” and edit the blocks in the text device copy to these blocks:
Don’t forget to make it show on “ShowText1” and hide on “HideText1”
EXTRA INFO!!!
You’ll want to copy the text device separately to keep the blocks for configuration. It will make it faster.
- Now we need to tell the player what rarity they are holding, get out a game overlay device and set its content scope to “player” then set it to the top right, now write this code into the device:
Congrats, you made it to the end of the guide, I’m proud of you.
- 0/10
- 1/10
- 2/10
- 3/10
- 4/10
- 5/10
- 6/10
- 7/10
- 8/10
- 9/10
- 10/10
- 11/10
Please tell me if there are any errors within the guide, thanks!
Extras
You can expand on this with more rarities and slots for merging.
Try to make it so you can have common blocks spawn in for merging.