User Tag List

Results 1 to 3 of 3

Thread: Random color effect

  1. #1
    Clicker Multimedia Fusion 2Android Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Dec 2010
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random color effect

    Hi, when the character touches an ojject a circle appears, I want this circle to have a random color setup.

    Actually this is half working, what I did was:

    "Set the New color:
    Random(0-9999), Random(0-9999), Random(0-9999)"

    But I never get pink or purple purple, so I think something is wrong here ._.

    Thanks in advance =]

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Random color effect

    That would be because colors don't go from 0 to 9999...

    Colors, 0-255. Set the new color to Random(256),Random(256),Random(256)

    Random(256) generates a number between 0 and 255, inclusive. I'm not sure what happens when you exceed the limit like you did, I don't know if it wraps or if it stops at 256.

    EDIT: The colors DO wrap, but it throws the chances of getting a light color off by giving the numbers 0-15 an additional chance. Regardless, Random(256). I'm getting pinks with it. I'm getting all colors with it.

    The only other thing might be that you don't understand how the colors work? The RGB value is a single value from 0 to 16777215, so you could just do Random(16777216), but it appears that MMF2 doesn't like to do random numbers that high, so it returns 0 every time.

    Instead, you will replace the color, and set the new color to:

    GetRGB(random(256),random(256),random(256))

    Enjoy. -Eliyahu

    DOUBLEDIT: Looki posted as I was editting my post >_>

  3. #3
    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 color effect

    To me it seems like he's not using the GetRGB(R,G,B) function. He just put R,G,B in the expression editor, which is valid syntax according to MMF, but the things after the first , are ignored... still, you should use Random(256), otherwise you get unpleasant results.

Similar Threads

  1. [BUG 256.34] Replace color doesn't always work in standard 256 color mode
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 26th October 2014, 10:21 AM
  2. Multi color effect?
    By PandaExplosion in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th June 2010, 10:59 PM
  3. Random Color Generator App
    By Eliyahu in forum File Archive
    Replies: 4
    Last Post: 2nd January 2010, 08:15 PM
  4. Color Tinting Ink Effect?
    By Steven_Provost in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 29th January 2008, 07:09 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
  •