How do I choose random level, but...

0 favourites
  • 3 posts
From the Asset Store
Unlock Levels, Worlds & skin plus add coins by watching ads
  • How do I allow the player to choose a random level, but exclude the previous 3 levels played? I want the excluded levels to be playable after 3 levels have been played.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ummm... I think you can add an array (small 3 by 1) and then store the last three levels as Lvl1,Lvl 2, Lvl 3 then you can code in after the random lvl number that is the lvl number equals any of the past three it re-rolls (You will probably need another mechanism that stores the last lvl then pushes the next two back.)

  • Ummm... I think you can add an array (small 3 by 1) and then store the last three levels as Lvl1,Lvl 2, Lvl 3 then you can code in after the random lvl number that is the lvl number equals any of the past three it re-rolls (You will probably need another mechanism that stores the last lvl then pushes the next two back.)

    I'm unfamiliar with using arrays. I'll have to read more on it. I think I get the part of storing the level and re-rolling if it lands on any of the stored numbers. I don't understand how I can "push the next two back." Maybe on start of layout, modify the array?

    Is there an easier way? Is it possible do this using variables?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)