How do I make a random level select?

0 favourites
  • 4 posts
From the Asset Store
A set of retro 16-Bit Neon UI elements to make your menus pop!
  • I'm making a party game that when started will ideally choose a random level (layout) and upon completing the level, will then choose another level. I've been able to make it do this, the problem is making it not choose a level that has already been played in that session (It will be a first to 3, or 5 wins type of thing)

    Having a button that goes to layout by name and having choose("level1","Level2") etc works for the first part, but will of course choose levels already played.

    I've also tried an array, to choose a random order of levels and then play through them, but couldn't get that to work as I've never used arrays before, and found it confusing.

    If anyone knows how to do it with arrays, or another way, that would be very useful, thanks!

  • If your layouts named like Level1, Level2, Level3, you can do this with permutation table of the Advanced random plugin. Here is a simple demo that shows random animation frames without repeats:

    dropbox.com/s/qschy8ji3bfrvxx/PermutationRandomImages.c3p

  • If your layouts named like Level1, Level2, Level3, you can do this with permutation table of the Advanced random plugin. Here is a simple demo that shows random animation frames without repeats:

    https://www.dropbox.com/s/qschy8ji3bfrvxx/PermutationRandomImages.c3p?dl=0

    Thank you, looks like this should work, I'll test it out tomorrow!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Works perfectly, thank you!

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