Using a Rule to change the specific RGB value of an actor

proNounproNoun Member Posts: 8
edited April 2012 in Working with GS (Mac)
Hello.

I am trying to change the RGB value of an actor when using a Rule. Currently the best I can do is use the 'Change Attribute' action to set self.Color.Green to on or off, or self.Color.Red to on or off, or the blue. But this changes the actor from totally green, to totally red, or totally blue, or black... etc.

What I really want is to be able to do is simply decrease the red in the actor's RGB value by 5, for example (e.g. from 200 to 195). Is there a way to do this?? By the way, I'm wanting to do this on an individual instance basis of an actor - but an answer of whether or not I can do this at all would be very useful to know.

EDIT: And then I find out that the self.Color.Red value can be set anywhere between 0 and 1; making what I wanted possible. Now to figure out how to apply to 1 instance of an actor where there are many of the same actor on screen.... Hhmmmm

EDIT: Is there a way for me to mark this as solved, without posting another comment? Or should I just close this?

Best Answer

  • HoneyTribeStudiosHoneyTribeStudios Posts: 1,792
    Accepted Answer
    Any self attributes for an instance of an actor will only apply to that instance.

    e.g change self.color.red to 0.5

    will only change the color of the instance that the rule is inside.

    You can also use interpolate to fade colours up and down.

Sign In or Register to comment.