How do I change color smoothly?

Get help using Construct 2

Post » Thu Jul 16, 2015 11:31 am

I searched for the whole forums but I have'nt found answer. Is there a way to change the color of a sprite smoothly? I am using SetColor and AdjustHSL effects. Perhaps with lerp?

Thanks
B
17
S
3
Posts: 62
Reputation: 1,054

Post » Thu Jul 16, 2015 12:26 pm

Here's a demo
https://goo.gl/CQtG46
B
21
S
8
G
6
Posts: 177
Reputation: 8,134

Post » Thu Jul 16, 2015 6:47 pm

Thanks nice capx!

And if i have to go from a specific color to another, for example from light red to dark blue?
B
17
S
3
Posts: 62
Reputation: 1,054

Post » Thu Jul 16, 2015 7:38 pm

you can't "lerp" effect parameters..but ..
you can use instance variables.... LerpColors.capx
Image
B
65
S
23
G
7
Posts: 1,501
Reputation: 10,888

Post » Thu Jul 16, 2015 8:21 pm

Thanks, It is just what I was looking for!! :D

Small correction for future readers: If the first condition is set with "Every tick" you can avoid rewrite the same 3 actions


EDIT: How can I change the background color always smoothly?
B
17
S
3
Posts: 62
Reputation: 1,054


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, StillSarah and 31 guests