Color Change / Interpolation Trick
Hello fellow GameSalad users!
Does anyone else find it tedious and time consuming to set up color changes?
I came up with a simple, reliable way to change or interpolate an actors color, without having to create 3 'change attribute' or 3 'interpolate' behaviors for Red, Green and Blue. I've found this trick to be quite useful and I implement it in nearly every project I work on.
Here's a link to a sample project with this setup: https://drive.google.com/drive/folders/0B-aAU3Qyg31lZnI5a0hTSl9rRWM?usp=sharing
Create a text attribute in your actor and name it 'color'
Make a rule that if self.color = "red"
interpolate self.Color.Red to 1
interpolate self.Color.Green to 0
interpolate self.Color.Blue to 0
Repeat this process for each color that you'd like to be available for your actor, and then whenever a color change is in order, insert the behavior:
change attribute self.color to "red"