How to make a Level Counter?

I’m looking to add a level counter to my game, something that tells the player which level they’re on. The question is, how do I set this up? Do I need some sort of Global variable that goes up by one each time the player makes a level transition? Something like “Global Variable starts at 1, Mailbox has the Level Counter, send a message to the Mailbox to increase the Level Counter Global variable by 1 each time the player makes a level transition”?

I apologize if this is considered “too simple” to help with, but I am very new to Flowlab and don’t find the Behaviours handbook very useful in terms of what outlining what can be done with the behaviours. Is there more extensive documentation or tutorials somewhere on this website or elsewhere with example games that have Notes on each behaviour block so I can follow the mindset behind each coding decision?


If you use the LoadLevel, there is a “Get” input.
That will output the current level the player is one. Let’s say you have something like a menu at the start of the game, level 1 would then be considered level 2. So just do A-1 and that would give you the correct result


Thanks for telling me about the “Get” input of the LoadLevel behaviour block. But how exactly do I run the behaviour blocks in my game to get a Level Counter working? Is it like how the video shown in the “Help” section of the LoadLevel block outlines things? The screenshot below is what I tried:

That should output the current level you are on :+1:

Thank you. It’s just that I originally tried using the “get” input of the LoadLevel block to input itself into a Label block’s value, and that didn’t work. Then I remembered that Flowlab logic flows left to right, and so to use the “get” input of the LoadLevel block, I needed another block to its left to trigger the “get” input. I thought the Always Trigger block would work better, but then I remembered that a level counter only needs to load once per game start, so the Once block seemed more logical, and that worked.

Even so, is there a better way to make a level counter, if one exists?

1 Like

That’s a pretty simple way, just 3 behaviors. There isn’t a simpler way to make a level counter, it’d only be different ways at this point.

1 Like

Thanks again. I’m glad I’m starting to learn the ropes of Flowlab with the help of those here on this forum.