How To Make Overlays Visible When Players Have an Amount of a Certain Item [Difficulty: 🟧]

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!

:stop_sign: WARNING: This guide contains block code and lower-intermediate experience!


Californian Difficulty of Guide™

:gear: Lower-intermediate [ 3 or 3.5 ]
:electric_plug: Usage of wires and channels [ :white_check_mark: ]
:construction: Usage of blocks [ :white_check_mark: ]


Part 1 ~ :school_satchel: The Item

First, before we get into anything technical, ask yourself… :thinking: 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

:thinking: 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.

Screenshot 2024-11-14 9.01.06 AM

You’re done with the first part!

Part 2 ~ :package: 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. :slightly_smiling_face: 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.

Screenshot 2024-11-14 10.25.03 AM

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:
Screenshot 2024-11-14 10.12.32 AM

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!
:bear: The Bear is out!!! :wink:

Difficulty?
  • :green_square: 1/10
  • :slightly_smiling_face: 2/10
  • :+1: 3/10
  • :weary: 4/10
  • :orange_square: 5/10
  • :neutral_face: 6/10
  • :red_square: 7/10
  • :expressionless: 8/10
  • :purple_square: 9/10
  • ⯀ 10/10
  • :smiling_imp: 11/10 (vote if you dare)
0 voters
3 Likes

You know, I like this guide. It’s not TOO difficult, but it’s great for level systems.

4 Likes

I love this guide and eating penguins.

really cool guide

Thanks! Sorry, I was inactive for about an hour!
I hope everything works and I didn’t leave anything out…

:bear: bear bump™ :bear:

hmmm interesting, that emoji use is a very cool technique to make the readers more engaged into the post, nice guide!

i didnt read through it all, but cant you do the same thing but its easier? im going by the title so i might be wrong.