Hey, guys! California here! If you’re one making those simulator or tycoon type games, you’re probably wondering… How can I make player levels when they have __ of something? Well, you’re in luck because I’m gonna show you how to do it! In a EASY way!
WARNING: This guide contains block code and lower-intermediate experience!
Californian Difficulty of Guide™
Lower-intermediate [ 3 or 3.5 ]
Usage of wires and channels [ ]
Usage of blocks [ ]
Part 1 ~ The Item
First, before we get into anything technical, ask yourself… What item am I using?
Before we start with this guide, you need to decide which item you are trying to set as an example. In this guide, we’ll be using Research, but you can use anything else.
Accessing the Item
How will players be collecting the item? Will you be using buttons? Zones? Triggers? Whatever you use, make sure players are able to access your item. Connect these to item granters or use item spawners.
In our example, I’ll be using a BUTTON.
We will wire the button to the item granters to grant the item.
Button pressed < grant item
is the code that will grant the item.
You’re done with the first part!
Part 2 ~ Managing the Item
Now, in this section, we will be managing the item, which will represent our overlays. Now, this is where it gets tricky. Don’t worry, you will be all right!
The Item Manager
To manage the item, we need an inventory item manager. Place down one and set the item to whatever you will be managing. In this case, it will be research.
Part 3 ~ Creating the Levels
The Manager Block Code
Now, let’s get to the block code! In your Inventory Item Manager, create a new block when it receives when the amount of an item changes.
We need it to broadcast on a channel when it receives a message on a channel. In order to do so, we need to have this type of block code. Each channel triggers a different overlay, so each particular channel shows a particular overlay. Here’s the block code:
You can have any number or any channel name. This is just an example! Remember this is in our inventory item manager!
The Overlays' Block Code
Now, we need to get to our overlays! We don’t need to modify any of our settings except setting all scopes to the player. Make sure they aren’t visible on game start!
For however how many levels you have, that’s how many overlays you need. In this case, we need three overlays to represent our three levels.
Create a block code for your Level 1 Overlay. Don’t worry, this time it’s easy! Since we already have our important channels set up, all we have to do is set the text to our “Level #” when it receives on the particular level # channel.
For Level 1, it would look like this…
For Level 2, it would look like this…
And so on, and so on…
Part 4 ~ Testing + Tips
Test it out! Does it work? Did you follow your steps correctly? If so, great! The great thing about this method is that it could work for multiple things beside overlays.
đź’ˇTips
-
You can use channels to add other level features, such as deactivating barriers, granting items, and activating lasers and Sentries for Level progression and challenges!
-
If you want to implement actual levels, use properties and set the amount of an item to update a property. From there, you can do other things!
-
You can use different items, or use properties to make in-game currencies like XP or creative currency. Properties nearly work the same way as items do in some cases!
Thanks for reading the guide! I hoped it helped!
The Bear is out!!!
- 1/10
- 2/10
- 3/10
- 4/10
- 5/10
- 6/10
- 7/10
- 8/10
- 9/10
- ⯀ 10/10
- 11/10 (vote if you dare)