H
HenrikoNumberOne
Guest
Hello! I'm trying to make a progressive level unlock (and level select) system in my game. There are over 30 levels in the game right now, but every single one is unlocked on the level select screen when you start the game. I would like to only have level 1 unlocked at the start, and that you have to complete that level to unlock the next one and so on.
I already have a global variable called global.level_complete which is set to 'true' whenever the player completes the current level. However, I don't have a specific variable for every level (or room, if you'd like). I wouldn't have that big of a problem with adding that, although I still don't really understand how I would go about making a level unlock system even if I did have a unique variable for every room.
I tried to do something similar to this; (haven't tested it just wrote this in the post but something similar was in the project's code)
...but I don't really know really.
Any help would be very much appreciated!
- Henriko
I already have a global variable called global.level_complete which is set to 'true' whenever the player completes the current level. However, I don't have a specific variable for every level (or room, if you'd like). I wouldn't have that big of a problem with adding that, although I still don't really understand how I would go about making a level unlock system even if I did have a unique variable for every room.
I tried to do something similar to this; (haven't tested it just wrote this in the post but something similar was in the project's code)
Code:
//In current level var_object
if global.level_complete {
room_next().completed += 1;
}
//In the next level var_object
if self.completed >= 1 {
self.unlocked = true;
}
Any help would be very much appreciated!
- Henriko