User Tag List

Results 1 to 8 of 8

Thread: Choose from a list of values?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    iCouch's Avatar
    Join Date
    Feb 2017
    Location
    Salt Lake City, Utah
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Choose from a list of values?

    I'm trying to find a function that chooses from a specified list of values.
    So you would put something like
    Code:
    choose(16, -16, 0)
    into the expression editor and it randomly choose one of those values.

    Is there a way to do this?

  2. #2
    Clicker Fusion 2.5Fusion 2.5 MaciOS 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)
    advaith's Avatar
    Join Date
    Jun 2015
    Location
    SF Bay Area, California, USA
    Posts
    1,325
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can use an extension, such as Mersenne Twister Random Object, Random Pool, or Randomizer Object.

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    iCouch's Avatar
    Join Date
    Feb 2017
    Location
    Salt Lake City, Utah
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll check those out, thank you!

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    iCouch's Avatar
    Join Date
    Feb 2017
    Location
    Salt Lake City, Utah
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where can I download the Mersenne Twister object? I can't seem to find a non-outdated download link.

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    646
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    This can be done natively in Fusion as well, if you desire. Use the Random Range function: RRandom(Min, Max). Make sure you use the two "R"'s, as the range feature doesn't work with the standard Random(val).

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Using casleziro suggestion on your example,
    if you only need the specific values you wrote down,
    that would be:

    16* RRandom(-1,1)

    if you need a bigger/more varied list of elements,
    you can use string tokenizer to split a string like 1|5|12|3|7|24
    and then pick val(random(numberofelements)) (pseudocode!)

    or a list object,
    untick 1-based index in its properties
    write down all your numbers in the list, one x line
    and pick:
    Val( List Line Text$( "List", Random(List Nb Lines( "List" )) ) )
    (real code)

  7. #7
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    646
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Right, I completely missed the point of the question and assumed Electriic meants a random number from within a range. Thanks, Schrodinger.

  8. #8
    Clicker Fusion 2.5Fusion 2.5 MaciOS 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)
    advaith's Avatar
    Join Date
    Jun 2015
    Location
    SF Bay Area, California, USA
    Posts
    1,325
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Electriic View Post
    Where can I download the Mersenne Twister object? I can't seem to find a non-outdated download link.
    All of the extensions I mentioned are in the Extension Manager, so you don┤t need a download link.

Similar Threads

  1. Duplicate values in the list object
    By ffomega in forum Fusion 2.5
    Replies: 2
    Last Post: 21st April 2015, 06:42 PM
  2. using a list to choose random enemies.
    By Mindhack in forum Fusion 2.5
    Replies: 2
    Last Post: 27th November 2014, 01:25 AM
  3. List Object contents as Values
    By Soilydude in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 14th August 2013, 01:14 AM
  4. Negative values in a List, and Global Values
    By aidmm in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th January 2007, 07:08 AM
  5. Dropdown list to equal two values?
    By Leathel in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 24th August 2006, 06:28 PM

Posting Permissions

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