Turn after colliding with an object

monkeedmonkeed Member Posts: 22
edited July 2012 in Working with GS (Mac)
I'm trying to setup a rule where my actor turns 90 degrees clockwise and continues moving every time it collides with a wall. This is similar to the game Chu Chu rocket when the mouse always turns to the right when it hits a wall.

Any ideas? Thanks

Best Answer

  • NovicaStudioNovicaStudio Posts: 174
    Accepted Answer
    When it collides with a wall have a change attribute self.rotation to self.rotation+90.
    Also, create a rule that if self.Rotation is greater than or equal to 360, change attribute self.rotation to 0. So every time it hits a wall it will change the direction. If you need additional please ask an I might be able to put together some sort of template.
Sign In or Register to comment.