How do I dynamically change colors on a sprite?

0 favourites
  • 4 posts
From the Asset Store
Colors Swap
$4 USD
60% off
Full game Construct 2 capx code source to post on Google Play
  • Hi everyone.

    Could someone look at this capx for me and clue me in on a way to go about doing this?!AveyCUjlTWnXgvUOivfCIN8fJ03F-w

    At the start of my game I want the player to have the option to customize their skin color. Not any color at all, but instead I've created a few predefined skin tones in Photoshop using an HSL adjustment layer, see here:

    Having 2 shades of color on the same object though is a problem (I actually want to have more than 2 later). At first I thought of using 2 separate 'Replace Color' effects to do this. That actually works, but replace color picks up on the gradients and anti-aliased edges where the 2 colors meet. creating at best an ugly grey line and at worst huge streaks of white, depending.

    So is there anyway to do this using, I don't know, the tint mask or the adjust hsl effects? I've played with them but I don't know how to "convert" a PS adjutsment layer into some Construct can make sense of. I guess basically what I'm asking is how do I get the HSL and RGB info from my reference files and make that work with C2's effects?

    Any help on this would be huge. Thanks for any help.

  • Well, if it's limited to a predefined list of skin tones, I don't see why you wouldn't put them all in different animation frame / name, with no effect whatsoever.

  • I thought about it but there are far too many separate images and animation frames to do it that way, it's not practical.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Is it possible? did u succeeded? if yes then i wanna know how? i want the same!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)