Scene Actors and Rules

wormilwormil Member Posts: 127
edited March 2012 in Working with GS (Mac)
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?

Best Answer

  • JohnPapiomitisJohnPapiomitis Posts: 6,256
    edited March 2012 Accepted Answer
    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

  • wormilwormil Member Posts: 127
    Oh right, I'd need to % 1 it :) I thought it would do it automatically, similar to an angle > 359 :P
Sign In or Register to comment.