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

Just started using Construct 2? Post your questions here

Post » Mon Jul 13, 2015 8:41 am

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.
Last edited by mrneko on Wed Jul 15, 2015 10:39 am, edited 1 time in total.
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Mon Jul 13, 2015 9:34 am

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jul 13, 2015 11:56 am

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?
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Mon Jul 13, 2015 12:17 pm

mrneko wrote: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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest