Level Progression System

Godot Version

4.3

Question

In the attached screenshots you will see a rough outline of a level progression system for my very short platformer game. What I would like to do is store an exported string variable, levelFinished, at the goal posts / end of my levels in the goal post. Once the level is beat, I need the code to access a global script, Progress, with the literal value of the string levelFinished, so if levelFinished = “w1p1Beat”, I need it to go Progress.levelFinished = true, but I need the literal value of levelFinished substituted right there in the code, so it is technically Progress.w1p1Beat = true and I am unsure if this is possible and any help would be greatly appreciated. I have tried looking through the documentation but all functions that return the value of the string are not working.

Can you show a method of returning the string, which isnt working?

Could you not instead, simply call a function in Progress to let it know which level was finished and deal with it there.

Progress.update_level_as_finshed(levelFinished)
1 Like