[SOLVED] Can't open new levels when old one is completed ://

I am trying to have a level select screen so that when one level is completed, the next one opens. if the level is failed, the next one does not open. the issue is:: say the level is “Failed”, it is saved in Level1 as “Failed”, but when loading the text and trying to make it match the status of the button, the button can only be modified as a value but “Failed” is not a numerical value, rather a lexicon (text) value. so it doesn’t move the Text to the object “Button” which means the action of changing the animation doesn’t work. What can i do?

I hope I’ve made sense ://

Can you explain what you mean here?

If you are referring to the animation names, then click on the “Use an expression” button:




to allow you to use the LvlBtn1Status variable:

Hi I actually sorted it myself by using numbers instead of text but I was just saying that there was a text variable called Failed. I wanted to modify the Text variable but it’s not possible to modify a text variable with GDev5 anymore so I was struggling to find a way around it. I opted to scrap the whole modify text variable route and made fail equal the number 2. not sure if I’ve made sense but thank you for your help ! :slight_smile:

What do you mean by that? You can modify text variables with the change variable value action, and GDevelop will determine what options are available based on the variable type.

The action was combined recently, maybe you are looking for the old one? Instead of separate actions for string or number, there is only one action to change a variable (well, two, one for object variable, one for scene/global variable)

1 Like