Touch Change Color

itwebsolutionitwebsolution Member Posts: 40
edited March 2012 in Working with GS (Mac)
All,

I am wondering of anyone has a reference for how to make an actor change color when touched?

I would like to create an actor, that when touched, cycles through the rainbow of colors (i.e. starts as blue, then when touched, turns red, green, brown, yellow, orange, etc.). Any ideas?

I was thinking of making a color attribute and then setting it when touched, and then making a rule to change the color of the actor depending on the attribute, but that seemed too complex...

Comments

  • DimensionGamesDimensionGames PRO Posts: 993
    When touch is pressed change game.whatcolour to game.whatcolour+1

    When game.whatcolour = 1 change colour to blue

    etc.
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    @itwebsolution
    I would like to create an actor, that when touched, cycles through the rainbow of colors (i.e. starts as blue, then when touched, turns red, green, brown, yellow, orange, etc.). Any ideas?
    Brown ! . . . ? . . . Brown ! . . . in a rainbow !! 8-X ;)

    It should be easy enough, just need to cycle the RGB channels so their on/off positions are offset from each other.

    Sorta like this:


    R G B
    ........
    1 0 0
    1 0 1
    0 0 1
    0 1 1
    0 1 0
    1 1 0


    Looks like something for tables ! But I don't know how to use tables, so a bunch of rules will have to do . . . . . I will be back !!
  • CloudsClouds Member Posts: 1,599
Sign In or Register to comment.