User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Random Number Generator

  1. #1
    No Products Registered

    Join Date
    Aug 2006
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random Number Generator

    How does it work?

    Fusion 2: Build R242

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Number Generator

    it generates a number between 0 and whatever number you entered, -1.

    so random(5) would give you a value from 0 to 4. If you wanted a number from -6 to 5, it would be random(12)-6

  3. #3
    No Products Registered

    Join Date
    Aug 2006
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Number Generator

    k, thanks!

  4. #4
    No Products Registered

    Join Date
    Aug 2006
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Number Generator

    Ok, I have a problem:

    I'm trying to make it so that at the end of an animation, it will jump to random frame. So I made "Jump to frame-use a calculation- Random(4)" But I keep getting the same results. I also don't want it to jump to either frame 1 or 2. So, I made a command for "Never- Jump to frame 2" and a command for "Never-Jump to frame 1" but it still does that. All the time. Why?

  5. #5
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Number Generator

    "Never" isn't used in that way - as far as I remember, that condition is just used for testing, to prevent an event from ever occurring.

    Instead, use random(2) + 2. This will generate a random number from 2 to 4 (2+0, 2+1, 2+2), and set the frame to that value.

    If that doesn't work, try random(2) + 3... I really can't remember if the frames are 0-based or not.

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Number Generator

    Never conditions aren't going to effect anything in a different event. Never conditions are wholly useless if you ask me.
    I dunno about the frame jump problem... but keep in mind you might be generating a 0 with your random() expression. I don't know if frames are 0 based.

    EDIT: beaten to it

  7. #7
    No Products Registered

    Join Date
    Aug 2006
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Number Generator

    Thanks a lot, this will help. Random(2)+3 worked, for future reference.

  8. #8
    No Products Registered

    Join Date
    Aug 2006
    Location
    Westcountry, UK
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Number Generator

    What does "randomize" do ?

  9. #9
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    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)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,537
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Random Number Generator

    Quote Originally Posted by raytrace
    What does "randomize" do ?
    Allows for greater control over the randomness of numbers. Or, to quote the help documentation:
    Initializes the seed of the random generator to a specific value. Random numbers are generated from a mathematical algorithm. The number used as a seed can be modified with this action. Using the same seed will make Multimedia Fusion 2 Developer random generator to always generate the same list of random numbers: great to create demos.
    .:::.Joshtek.:::.

  10. #10
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random Number Generator

    Paradoxically, as it says there, it can also make the numbers less random.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. 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
  2. A Random Number Generator from a Pool
    By robsterdobster in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 19th February 2012, 10:13 PM
  3. Random Number generator
    By RoachLIVEinLA in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 22nd July 2009, 03:16 PM
  4. Random Map Generator?
    By dragonguy in forum Multimedia Fusion 2 - Technical Support
    Replies: 37
    Last Post: 6th July 2008, 03:58 PM
  5. Possible bug with random number generator
    By MJK in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th November 2006, 07:27 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
  •