[Solved]How do I disable input once collision happens?

0 favourites
  • 4 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • Hi everyone,

    I have an object that is able to move right, left and up on touch. The game itself is vertical scrolling. When the object collides with "enemy" it is supposed to drop vertically down. However, the control is still enabled when the object is falling so when I tap right or left the object will move off screen.

    How do I disable touch control once collision happens?

    I used set ignoring input but it doesn't pick up.

    I'd also like to know how to stop object from moving off screen if possible.

    Thanks.

  • Set ignoring input sounds like the right action, are there any conflicting events?

    For the second question, there is the bound to layout behaviour that might come in handy..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks LittleStain. Got it to work somehow. I am trying to create random enemies after traveling certain distance. As I mentioned, my game is vertical scrolling, is it possible to create a different enemy after y distance from the beginning?

  • Thanks LittleStain. Got it to work somehow. I am trying to create random enemies after traveling certain distance. As I mentioned, my game is vertical scrolling, is it possible to create a different enemy after y distance from the beginning?

    If you can get the travelled distance into a variable, this would be quite easy..

    You'd just have to use a system compare two values condition to decide which enemy to spawn..

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