User Tag List

Results 1 to 4 of 4

Thread: Questions about "Random" ex

  1. #1
    No Products Registered

    Join Date
    Jun 2007
    Location
    Norway, Oslo
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Questions about "Random" ex

    I dont think I get how the Random function works.
    My problem:
    Collision between "x" and "Y"
    then
    set counter to "Random (1-9)"

    But the counter gives me numbers like 22954
    And if I set the maximum value to 9, then I only get 9.
    Why?

    And another "random" question; how do you choose an random animation from an object?

  2. #2
    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: Questions about "Random" ex

    Random(n) will give you a number from 0 to (n-1) - no idea what random(-8) would do (which is what you have in random(1-9)).

    You can choose a random animation by using the "Use a calculation" button on the Select Animation dialog box - I think they're indexed from 0. But it may be easier to just set a value to the result of a random(), then have a list of "If x = 0 set animation to Animation0, if x = 1 set animation to Animation1" conditions.

  3. #3
    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,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Questions about "Random" ex

    Set the counter to Random(9) for a random number between zero and eight (nine possibilities overall).
    Set the counter to Random(9)+1 for a random number between one and nine (nine possibilities overall).
    .:::.Joshtek.:::.

  4. #4
    No Products Registered

    Join Date
    Jun 2007
    Location
    Norway, Oslo
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Questions about "Random" ex

    Aha!
    Now I get it.
    Thanks for the quick reply

Similar Threads

  1. Random Chunk Generator using "Create New Objects"?
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th August 2013, 12:42 PM
  2. Random avec "entre"
    By flechenoir in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 13th October 2012, 02:57 PM
  3. "Random()" only picks a number lower than 100,000?
    By Jase in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd September 2011, 02:51 PM
  4. Fonctionnement de l'extension "Random Pool"
    By BenjaminG in forum File Archive
    Replies: 0
    Last Post: 19th March 2008, 12:57 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
  •