i have a number set on a character, and when it goes to the next level, it resets. how do i make it so it stays the same level to level?
This is something I want to learn too.
I’m pretty sure you have to use the global command for that, but I don’t know how it works.
Adding my comment here as a second “bump” to your question (and another reason why we need more tutorials).
Click the character. Click edit. Then you’ll see Behaviors, edit sprite, etc. you should also see Reset. change that to keep between levels
Global blocks save between levels, save blocks save between restarts, and cloud blocks save between devices.
It works exactly the same as a number block, only if you activate an input on one, it activates all globals/saves/clouds of the same name.
where do you attach it
Just replace the number block with the global block.
it didnt work, now the counter isnt going up.
Use a save block. Attach your number to the save block, and name the save block something.
You can use the save behavior ( like slime said) for that.
Globals only save through levels if they are set to “keep between levels” so I don’t recommend that.
I think the save behavior is the best options for this.
If you don’t know how to use it, click on it, and click on Help( leads to the behavior guide).
I don’t think that’s right, but I haven’t used flowlab in a while. That’s how my game Serenity functions.
Heheheh… If it is broken, why fix it…?
Three methods to save a value between levels, just to clarify:
- Set the object itself to “Keep Between Levels”, this usually isn’t the best approach, but it prevents the behaviors from getting reset
- Save the value using a Save block, then read it back some time later (keep in mind that this saves the values between games as well as between levels
- Use a Global block. Global values are not reset between levels. Global blocks are similar to a Number, but the value is shared so that updating one block updates all of them with the same name
I was pretty sure of that, since that’s how Till We Have Faces functions, thanks for the clarification @grazer.
Thanks for the clarification