User Tag List

Results 1 to 4 of 4

Thread: Select a random number but never the same.

  1. #1
    Clicker Fusion 2.5 (Steam)
    Naturium's Avatar
    Join Date
    Jul 2016
    Location
    France
    Posts
    22
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Select a random number but never the same.

    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.

    Sans titre 1.png

    Thanks ^^

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Brovic's Avatar
    Join Date
    Jul 2006
    Location
    France
    Posts
    311
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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:

    random_not_the_same.mfa

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

  3. #3
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    wpd's Avatar
    Join Date
    Nov 2015
    Location
    SE Asia
    Posts
    406
    Mentioned
    12 Post(s)
    Tagged
    1 Thread(s)
    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

  4. #4
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    tk22's Avatar
    Join Date
    Dec 2014
    Posts
    54
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    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).
    RandomButNotSame.mfa

Similar Threads

  1. Data Elements>Sounds can I use an expression to select random one?
    By steakor in forum Android Export Module 2.5
    Replies: 0
    Last Post: 20th May 2017, 01:02 PM
  2. Replies: 21
    Last Post: 21st June 2015, 09:26 PM
  3. Getting a random number between a negative and positive number
    By D_Light in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th January 2013, 11:51 PM
  4. Select 1 of 2 flags at random
    By Thomas in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th June 2011, 01:41 PM
  5. How do I select a random frame in my project?
    By vbsd94 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 13th January 2011, 06:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •