Color Change

triton13triton13 Member Posts: 161
edited March 2012 in Working with GS (Mac)
Hey guys, I was wondering if this is possible and how to do it. I have some actors that are a certain color and when you press it, it deletes and adds a point. Press the wrong color and it resets the game. What I want to do is make it so that an actor changes colors and when it gets to the correct color it deletes and adds a point. When you press it and it's the wrong color, it resets. How would I do this?

Comments

  • CloudsClouds Member Posts: 1,599
    edited March 2012
    In this example I have made GREEN the colour that gives you 1 point.


    . . . . . . . . . . . . . . .



    Timer - every 1 second generate a random number between 1-4.

    Rule, if number is 1 spawn (or move into position / recycle) RED actor
    On touch reset.
    After 1 second destroy actor (or move back to original position / recycle)

    Rule, if number is 2 spawn (or move into position / recycle) BLUE actor
    On touch reset.
    After 1 second destroy actor (or move back to orginal position / recycle)

    Rule, if number is 3 spawn (or move into position / recycle) GREEN actor
    On touch change attribute POINTS to POINTS + 1.
    After 1 second destroy actor (or move back to orginal position / recycle)

    Rule, if number is 4 spawn (or move into position / recycle) YELLOW actor
    On touch reset.
    After 1 second destroy actor (or move back to orginal position / recycle)
  • triton13triton13 Member Posts: 161
    How do I have it generate a random number and also I want them to me moving in a certain direction.
  • CloudsClouds Member Posts: 1,599
    How do I have it generate a random number
    Change Attribute: XXX to random (1,5)
    and also I want them to me moving in a certain direction.
    That will look nice !

  • triton13triton13 Member Posts: 161
    I'm sorry but I'm a little confused. Do I put this all in the green actor? When I generate the number with change attribute, what is the XXX? Is that the colored actors? Sorry for being such a noob. =(
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    the xxx is the attribute your changing to the random number
  • triton13triton13 Member Posts: 161
    Do I have them all under the one colored item because I can't find them in there?
Sign In or Register to comment.