Rotate Together (Video Included)

creativeappscreativeapps Member Posts: 1,770
edited September 2012 in Working with GS (Mac)
Hello,

Ok As per video you can see once I click on green & yellow its rotate individually. I want to rotate both together with single click. For example once I click on green its rotate yellow automatically and on yellow click green also rotating.
How do I do that? Please help me out.

Comments

  • EIGHTHSINEIGHTHSIN Member Posts: 132
    You need a global variable to control individual actors, set up a game attribute called rotate, then within both actors create a rule that says,

    if touch is pressed & game.rotate is false,
    change game.rotate to true,
    otherwise change game.rotate to false

    In both actors set up a second rule that says,

    if game.rotate is true
    rotate anti clockwise by whatever speed you have set

    I think that should do the trick! ;)
  • creativeappscreativeapps Member Posts: 1,770
    @EIGHTHSIN Thanks for your reply. Somehow its getting stuck and not rotating smoothy and I am not able to put "true" in place of below rules its automatically shows 1. You can see in updated video.


    if game.rotate is true
    rotate anti clockwise by whatever speed you have set




  • EIGHTHSINEIGHTHSIN Member Posts: 132
    You can only set a boolean attribute to true, change the game.rotate attribute to a boolean and try the above again, it will work
  • creativeappscreativeapps Member Posts: 1,770
    edited September 2012
    working fine thanks a lot :)

    @EIGHTHSIN
    Why dont you apply for sous chef. You deserve for that
Sign In or Register to comment.