Get two colliding objects to collide *once*

Get help using Construct 2

Post » Sun Aug 16, 2015 10:56 pm

So I have a situation where you have a little top down spaceship flying around. There's another object in the middle of the screen and when you ram it, I want it to move, but just a little bit in the direction you hit it.

Image

Specifically, I want you to make contact with it, push it, and then instantly turn off the collision detection. And actually the player "turns on" his own collision detection for about a second (think like a fighting game hitbox). So most of the time, your collision is OFF with the object, but if you hit it while it's on, it should push the object and instantly turn the collision OFF again.

I think I'm doing stuff in a sort of OK way, but the problem is, it seems like the initial "collision" never ends. So what you get is like, the collision *detection* turns off, but the existing collision seems to still persist, so the player can't travel "through" the object. Here's a couple of screens.

My events:
Image

Is there a way to kill existing collisions or something? Or is there some other way this can be accomplished? Thanks.
B
3
Posts: 2
Reputation: 179

Post » Mon Aug 17, 2015 11:17 am

Why has the player got custom movement as well as physics behaviour?
Why enable physics collisons at all?
Couldn't you just use something like this? :

player on collision with ball
ball is iscollidable -
> apply impulse to ball
> set iscollidable to false
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 Aug 17, 2015 7:46 pm

Hmm... maybe that's my problem. I'll try that, thanks.
B
3
Posts: 2
Reputation: 179


Return to How do I....?

Who is online

Users browsing this forum: Alvaro2, Hadyurik and 9 guests