Select a random number but never the same.

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Okay, so i'm currently making an android game where I have a String with multiple paragraphs.
    With the loop "action" I choose a random paragraph to be diplayed.
    But I want to never display the same paragraph twice.
    In a play 40 paragraphs will be displayed, and in total in the string there's 200, so is it possible to do that.

    Please login to see this attachment.

    Thanks ^^

  • Here is my solution. Maybe that's not the smartest.
    Copy each paragraph to a list object then display a random line of the list and destroy it so it can't be reused.
    Here is an example showing 4 of 20 paragraphs without replicating:

    Please login to see this attachment.

    Perhaps not exactly what you want, but you have the idea. Should work on Android too.

  • There's a real mathematical formula to this, which I have used in my old test project, found it on the forums way back.
    I can't see the post now, since it's hard to search this forum... and I lost the file on a pc upgrade, Hope someone knows the solution

  • If you are looking to display a random paragraph while never showing that same paragraph if it currently displayed then please take a look at the MFA I prepared using math (mod basically). :D
    Please login to see this attachment.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!