how to stop actor animation when it collide with wall

premvijay89premvijay89 Member Posts: 7
edited July 2012 in Working with GS (Mac)
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

Best Answers

  • ericzingelerericzingeler Posts: 334
    Accepted Answer
    Is the wall a boundary to the level, or are the walls a part of the platforms?
  • tatiangtatiang Posts: 11,949
    Accepted Answer
    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

Sign In or Register to comment.