How do I make a sprite fade / shimmer a different color?

0 favourites
  • 8 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hi there,

    I'm looking for a way if possible to set a sprite to gradually change its' tint to a specified colour, then go back to its original one. I've tried out the various effects but I can not get this to happen smoothly ... can anyone help this poor idiot out?

  • You can use the tint effect for this... the trick for a smooth transition is to probably use something like LERP.

    First, apply the tint effect to your object, then choose the RGB or HEX value you want your tint to be.

    Last make an event to smoothly change the tint... something like (pseudo-code);

    On trigger

    -- Set tint value to: lerp(self/tint.value, desired(tint).value, 1-0.3^dt) - (change the 0.3 to 0.1 or even 0.01 for a super fast change or lower it to like 0.5 or even 0.99 for a slow or super slow one)

    The same will apply to go back to the other colour... just do another lerp action from the self/tint.value to the desired(no tint).value


  • Thank you for the super quick response SoldjahBoy

    Unfortunately I don't think the TINT effect is the right thing to use as it has three values which all need their own lerp, whilst this isn't a problem to do, the three variables R,G,B cause the color to change wildly when I need it to shift to a distinct shade of pink.

    I don't think TINT is the right effect to apply for this ... do you happen to have any other suggestions?

    Many thanks!

  • You could make an overlay sprite that matches your main sprite - but colour it in whatever the tint colour is supposed to be, apply something like "overlay" or maybe "hard light" effect to it... then use LERP to adjust the opacity of the overlay object.

    That might work^


  • Agreed, tried that too but we have 40+ animations for the character so it requires an awful lot of effort. I have found a few effects that seem to offer the same service but the recent dropbox 'public folder' change means I can't download any of 'em

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah right, that is indeed a bit of an issue...

    Have you posted in the thread for the effect? A lot of those users who made effects are still active and may be able to provide a new link... or someone else may have the effect saved already. I know I have a few effects kicking around - which one were you looking for? I have a feeling I've seen it before (the "flash" effect), but I can't remember who makes it or what it's actually called. I think maybe Pode made something like that at some point?


    Maybe you could use something like THIS and use the tint effect to colourize it? I dunno if it will work since it flashes to white (it would probably need to be a grey tone to work with tint) but it could be worth investigating.


  • The one that I could find was this ...

    Try as I might I can't seem to find the download for it ... you don't happen to have it ?

  • I do not sorry, but Davioware is still active. I have sent him a PM to see if he can update the download link


    Just realised this is actually a Construct Classic plugin, not for use with C2! Man, I really should pay closer attention to stuff, lol.

    I'm not sure what else to suggest apart from painstakingly making a masking object, or seeing if someone like Gigatron would be willing to port over the old RetroFade plugin (or make it again from scratch?).


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