User Tag List

Results 1 to 5 of 5

Thread: pick a random odd value

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    RU, YKT
    Posts
    359
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    pick a random odd value

    how to pick random odd value? within these value - 1,3,5

  2. #2
    Clicker 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)
    Bree's Avatar
    Join Date
    May 2014
    Posts
    317
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I'm sure there's a fancy math equation for it, but just in case nobody replies one way would be to create a list and add the lines of what values you want. Then on your event, do this:

    Set counter -> Val(List Line Text$( "List", RRandom(1, 3) ))

  3. #3
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall 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)

    Join Date
    Jul 2006
    Posts
    574
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    You could also do (rrandom(0,2) *2)+1

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    RU, YKT
    Posts
    359
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    @danworth @Beejers
    thanks a lot!

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)

    Join Date
    Sep 2017
    Location
    Milano, Italy
    Posts
    130
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by danworth View Post
    You could also do (rrandom(0,2) *2)+1
    This is the correct way, (2N+1) is how in math you denote a odd number.
    I was replaing the same thing, but leter I see I was late

Similar Threads

  1. Pick a Random object and destroy by id
    By agarcia in forum Fusion 2.5
    Replies: 7
    Last Post: 20th August 2015, 01:25 AM
  2. pick alterable value at random?
    By Volnaiskra in forum Fusion 2.5
    Replies: 3
    Last Post: 3rd April 2015, 06:52 AM
  3. How can I pick a random sound???
    By Oliver in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th October 2011, 05:03 PM
  4. can I pick a random file?
    By Dave in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 16th January 2008, 03:02 PM
  5. Pick an object at random?
    By Clicktastic in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th August 2006, 01:31 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
  •