User Tag List

Results 1 to 5 of 5

Thread: Random Numbers Greater then Random Numbers...

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Location
    Georgia
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random Numbers Greater then Random Numbers...

    I'm trying to have a Random Number, lets call it A, be always greater then another Random Number, lets call it B.

    Random Number A > Random Number B

    Is this Possible?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Random Numbers Greater then Random Numbers...

    A = random(400)
    B = random(A)

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Location
    Georgia
    Posts
    194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Numbers Greater then Random Numbers...

    thanks much

  4. #4
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Numbers Greater then Random Numbers...

    What Looki suggested would work, but you may also want to add a failsafe in there because if A returned 1 as the result, then B would not be able to return a number less than 1.

    So you could do this:
    A = random(400)+10
    B = random(A)

    This way you will always have room to move if A returned a low value. Just a thought...

  5. #5
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Numbers Greater then Random Numbers...

    Actually it would. Random(1) = 0. But if A is 0, then B would be 0 too. So +1 is more like it..

    Or you can also do the whole thing the other way around:
    B = random(200)
    A = B + 1 + random(200)

Similar Threads

  1. Random Numbers and expiring the result numbers.
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 26th April 2013, 04:11 PM
  2. Random numbers?
    By infinitum3d in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 21st March 2012, 04:07 PM
  3. random numbers
    By nick_Peoples in forum The Games Factory 2 - Technical Support
    Replies: 12
    Last Post: 10th February 2010, 12:51 AM
  4. Random numbers help
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 5th January 2010, 12:41 PM
  5. random numbers
    By delusan in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 24th March 2007, 05:09 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
  •