How do I make the tank "stop" on collision?

0 favourites
  • 4 posts
From the Asset Store
Try to destroy your enemies in a hard battle! Good luck!
  • I'm trying to make a game just like this:

    oyunkolu.com/tam-ekran/2-kisilik-tank-savasi

    But when the tank collide the wall, it still moves upside (I'm pressing to "go forward" button). I mean it is rubbing to the wall and not stopping. But it must stop if it is touching to the wall.

    How can I do that?

  • Try and set 'time scale' to 0 for 0.5 secs. This will pause the movement.

    So... (Event) Sprite > On collision with Wall - (Action) System > Set time scale to 0 (2nd Action) System > Wait 0.5 Secs (3rd Action) System > Set time scale to 1.

    Every time the sprite hits a wall it will pause, then be able to move again.

  • Try and set 'time scale' to 0 for 0.5 secs. This will pause the movement.

    So... (Event) Sprite > On collision with Wall - (Action) System > Set time scale to 0 (2nd Action) System > Wait 0.5 Secs (3rd Action) System > Set time scale to 1.

    Every time the sprite hits a wall it will pause, then be able to move again.

    When using Car behavior, the game pauses at collision, but it doesn't play again.

    I'm using Sprite's actions (move forward, rotate cw etc.) instead of using behaviors in order to make the tank able to rotate when not going; and adding 8 Direction behavior and disabling default controls in order to collide with solids. In this situation, there's nothing changed. It's still not stopping.

    Thanks for your good answer, but unfortunately it doesn't work for me.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Add event, on overlap wall set speed to 0.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)