Change Character Color
OscarsCoding
Member Posts: 92
Hi! I am making a character for my game and when the character gets hit by an enemy, I want the whole player to turn red and not just turn into a red block, is there any way I can do that?
Comments
Try this:
-change attribute self.color red to 1.
-change attribute self.color green to 0.
-change attribute self.color blue to 0.
Mental Donkey Games
Website - Facebook - Twitter
That changed my actor to the right color I want, but how do I change it back to normal?
-change attribute self.color red to 1.
-change attribute self.color green to 1.
-change attribute self.color blue to 1.
Like @Socks said.
Just a suggestion...
It gives a nice effect, if instead of changing each color immediately back to 1, you interpolate them. 0.1 or 0.2 seconds for the interpolation time should be good.
Mental Donkey Games
Website - Facebook - Twitter
Agreed, depending on your needs interpolation looks a little nicer. Try making the interpolation times on each colour channel different, so you get hints of other colours in the transition.
Example
Interpolate self.color red to 1 - Duration 0.2
Interpolate self.color green to 1 - Duration 0.4
Interpolate self.color blue to 1 - Duration 0.8