Scene Actors and Rules
I have two actors in a scene. When I click one, I want the other one to change it's red by increasing it 0.1
I have a rule in my first actor "On touch inside" : change attribute: CurrentScene.Layer.otheractor.color.red = CurrentScene.Layer.otheractor.color.red + 0.1
Nothing happens. Any ideas?
I have a rule in my first actor "On touch inside" : change attribute: CurrentScene.Layer.otheractor.color.red = CurrentScene.Layer.otheractor.color.red + 0.1
Nothing happens. Any ideas?
Best Answer
-
JohnPapiomitis Posts: 6,256
Gamesalad actors use rgb for color, so it mixes red blue and green color attributes to get its color, and those attributes cant have a value over 1.
So is your actor white to begin with? Because if the actor is white, its color attributes are all 1 to make white.
So to change it red you dont do self.color.red to self.color.red+1 on touch
You would do on touch change self.color.blue to self.color.blue-1 and change self.color.green to self.color.green-1
hope that helps
Answers