how to stop actor animation when it collide with wall
![premvijay89](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
hi guys,
Currently am building a platform game,everything is working good,i only one problem how should i stop the actor running when hit the wall.i use the platformer template in gamesalad.help needed
looking forward
Currently am building a platform game,everything is working good,i only one problem how should i stop the actor running when hit the wall.i use the platformer template in gamesalad.help needed
looking forward
Best Answers
-
ericzingeler Posts: 334
Is the wall a boundary to the level, or are the walls a part of the platforms? -
tatiang Posts: 11,949
You can wrap the animate behavior in a rule for When actor collides or overlaps with actor wall --> [do nothing]; Otherwise --> Animate. Or, you can add a boolean attribute, self.stopped, to the runner actor and then change the value of that attribute to true when the actor collides with a wall (and false when not colliding or when starting to move again); also wrap the animate behavior in a rule for When self.stopped is false AND [moving left or right] --> Animate.New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User