Gradual Color Filter Change

For questions about using Classic.

Post » Thu Sep 16, 2010 11:20 pm

Hey all

I was wondering if someone could show me how to change a color filter gradually.
Like in a space of time it gradually changes from one shade to another.
Its for a game im not going to release yet and it would be most appreciated
Thanks if you can help

Smartcartridge
B
3
G
2
Posts: 16
Reputation: 707

Post » Thu Sep 16, 2010 11:33 pm

This should work.

percentageFromColor1toColor2 should be a value from 0 to 1
the ValueOf numbers should be from 0 to 255

[code:4mc2vspg]rgb(lerp(redValueOfcolor1,redValueOfcolor2,percentageFromColor1toColor2),lerp(greenValueOfcolor1,greenValueOfcolor2,percentageFromColor1toColor2),lerp(blueValueOfcolor1,blueValueOfcolor2,percentageFromColor1toColor2))[/code:4mc2vspg]
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Fri Sep 17, 2010 12:59 am

Davio was a bit faster...

Anyway, the same technique he described, but in a documented .cap


Download ChangeColor.cap
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Sep 18, 2010 10:24 pm

Thanks Guys.

Exactly what i need
B
3
G
2
Posts: 16
Reputation: 707


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests