User Tag List

Results 1 to 3 of 3

Thread: How can I change color of a displayed object on Android (RGB doesn't work)

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Dec 2008
    Location
    Italy
    Posts
    404
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    How can I change color of a displayed object on Android (RGB doesn't work)

    Hi everyone!
    I'm developing a game for Android, I want to randomly change the color of the character displayed on screen.

    To do that on Windows, I just create an active object 100 pixel wide with my color palette (palette_character), and then I set the color of my character with the command:
    RGBAt( "palette_character", RRandom(1,100), 0 )

    But this solution doesn't work on Android (it seems RGB commands cannot be used).

    Which is the best alternative way to do this on Android (aside from creating static animation of every colors, of course)?

    Thank you!


    --
    Edit for Admins: I should have posted on Android section (sorry, I just noticed). Feel free to move the post

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only way to color objects on Android, afaik, is the "Set RGB coefficient" function. For my project I split up the characters that require special coloring into different objects. The parts that need coloring are drawn in greyscale. I then use RGB coefficient on the parts/objects that need coloring.

    I think the device needs OpenGL support for this to work, though I guess most of them have it.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Dec 2008
    Location
    Italy
    Posts
    404
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Thank you Chrille, it works!
    In case it may be useful to someone, here's the (extremely basic) source with "Set RGB coefficient" function.
    Attached files Attached files

Similar Threads

  1. Replies: 1
    Last Post: 4th January 2016, 10:16 AM
  2. [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
  3. Set Font size, Resize object doesn't work in Android! [Example MFA included]
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 13
    Last Post: 28th September 2013, 10:41 PM
  4. Change X scale doesn't work.
    By ASD in forum XNA Export Module Version 2.0
    Replies: 1
    Last Post: 23rd May 2011, 11:57 AM
  5. [HWA Bug] Change Resolution mode doesn't work
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd November 2008, 09:22 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
  •