Replacing Actor from a random group of actors

dimps620dimps620 Member Posts: 49
edited January 2012 in Working with GS (Mac)
Every so many seconds I want to replace an anctor with 1 actor from a small group of actors. An example would be replacing a initial blue square with either a purple, red or yellow square. The timer part is easy. How would a I randomly change the main color square every couple seconds with a different color sqaure?

Comments

  • Fabri DamazioFabri Damazio Member Posts: 97
    You need create a number attribute for each color. Ex: 1- blue 2- red 3-green.

    Then make a attribute called "color".

    Group {
    Color = random(1,3)
    When color = 1
    change image "blue image"
    When color = 2
    change image "red image"
    When color = 3
    change image "green image"
    }

  • dimps620dimps620 Member Posts: 49
    Thanks. I will see if I can get to work.
Sign In or Register to comment.