Is this possible to make?


  • Posts: 16
Is it possible to make a system where you get a random level but still have in that level a counter?

you have 4 levels: red,green,blue,yellow

the first time you get red so that's level 1.
The next time you play is green the first level so that must be level 1 now.
So on and on for the next levels.
Is it possible to do that?


  • *
  • Posts: 2726
Here's one idea, if you want the level order set from the beginning:

Make a list as a game attribute. When the game is initialized (player clicks "new game" button, etc.), populate the list with a random level order, e.g. [green, blue, yellow, red].

Make another game attribute, "n", the level the player is on.

When the player completes the nth level, switch to scene [get item n from list].