Shifting/Blending Colors
RacetotheMoon
Member Posts: 323
I'm looking to allow an actor to change from one specified color to another. However, rather than having it immediately snap to the specified RGB value, I'd instead like the color, over the course of 1-2 seconds, to shift, or blend, to the next.
ie. RGB value (0,.25,.38) --> RGB value (0,.65, 0)
I'm assuming this needs to be done with an equation of some kind to translate each RGB value but my familiarity with coding is so minimal I'm not sure if I'm even looking in the right direction. I've been scouring the board and shared projects to see if there was anything similar, CodeMonkey's BodyShop (Demo) has helped get me pretty far. I'm afraid the more I look at stuff the more confused, and off topic, I'm getting.
If anyone knows of an example, or could help point me in the right direction, I'd greatly appreciate it.
ie. RGB value (0,.25,.38) --> RGB value (0,.65, 0)
I'm assuming this needs to be done with an equation of some kind to translate each RGB value but my familiarity with coding is so minimal I'm not sure if I'm even looking in the right direction. I've been scouring the board and shared projects to see if there was anything similar, CodeMonkey's BodyShop (Demo) has helped get me pretty far. I'm afraid the more I look at stuff the more confused, and off topic, I'm getting.
If anyone knows of an example, or could help point me in the right direction, I'd greatly appreciate it.
Comments
http://gamesalad.com/wiki/how_tos:gsc_fade_image_in_and_out?s[]=fade
when self.color.red is < (final red color value)
Timer (every)
.1 seconds
change attribute self.color.red to self.color.red+0.1
get the idea? Good luck!
'Alpha attribute of the actor to the Color → Alpha minus some constant,c, every x number of seconds.'
I'm not sure how that should look in the expression editor. Also, shouldn't this be a Constrain Attribute rather than a Change Attribute?