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

Get help using Construct 2

Post » Tue May 02, 2017 12:25 am

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?
B
10
S
3
Posts: 50
Reputation: 800

Post » Tue May 02, 2017 1:32 am

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

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
80
S
34
G
40
Posts: 3,029
Reputation: 30,393

Post » Tue May 02, 2017 7:46 am

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!
B
10
S
3
Posts: 50
Reputation: 800

Post » Tue May 02, 2017 8:28 am

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^

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
80
S
34
G
40
Posts: 3,029
Reputation: 30,393

Post » Tue May 02, 2017 8:39 am

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 :(
B
10
S
3
Posts: 50
Reputation: 800

Post » Tue May 02, 2017 8:43 am

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?

*EDIT*
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.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
80
S
34
G
40
Posts: 3,029
Reputation: 30,393

Post » Tue May 02, 2017 8:54 am

The one that I could find was this ...

effect-retroflash_t59596

Try as I might I can't seem to find the download for it ... you don't happen to have it ? ;)
B
10
S
3
Posts: 50
Reputation: 800

Post » Tue May 02, 2017 9:30 am

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

*EDIT*
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?).

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
80
S
34
G
40
Posts: 3,029
Reputation: 30,393


Return to How do I....?

Who is online

Users browsing this forum: SERG 04 and 3 guests