Collisions not working properly

Get help using Construct 2

Post » Fri Nov 27, 2015 4:31 pm

Hey. Having some trouble with these wee blocks that should blow up when they collide with the player, If you check the GIF, you can see that SOMETIMES they do and others they don't. I have no idea why this would happen. Has anyone come across anything like this before?

Image

Image
B
7
S
2
Posts: 60
Reputation: 604

Post » Fri Nov 27, 2015 4:35 pm

I'm not sure why you'd have a trigger once (sub)event on a triggered event..

in this case I'd probably use an "is overlapping at offset" event instead of a collision event..
Last edited by LittleStain on Fri Nov 27, 2015 4:38 pm, edited 1 time in total.
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 » Fri Nov 27, 2015 4:37 pm

I'm still a bit of a C2 noob. I assumed that if I didn't, it would just keep resetting the shake animation for as long as the player stood on the block. I've tried it without the Trigger Once, but it doesn't help. Tried just making the block explode on collision, but that doesn't work either. It;s a head scratcher.
B
7
S
2
Posts: 60
Reputation: 604

Post » Fri Nov 27, 2015 4:41 pm

Gypopothomas wrote:I'm still a bit of a C2 noob. I assumed that if I didn't, it would just keep resetting the shake animation for as long as the player stood on the block. I've tried it without the Trigger Once, but it doesn't help. Tried just making the block explode on collision, but that doesn't work either. It;s a head scratcher.


If it doesn't detect a collision, the "on collision" doesn't trigger..
Overlapping at offset y=1 or 2 should do the trick..

It could be your collision polygon has just 1point at the bottom, or has other issues that prevent the collision/overlap detection..
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 » Fri Nov 27, 2015 4:48 pm

Thanks! Tried the overlapping at offset idea, it works, but only if I've landed on the block, if I just run onto it, there's no change. Hmm...

Both objects have rectangle collision polygons.

Took out the Trigger Once n' everything is well! Thanks again for you help! Really appreciate it.
B
7
S
2
Posts: 60
Reputation: 604

Post » Fri Nov 27, 2015 7:04 pm

Adding "For Each block" should help, too, I think.
B
32
S
7
G
4
Posts: 398
Reputation: 4,591

Post » Fri Nov 27, 2015 7:11 pm

grigrizljac wrote:Adding "For Each block" should help, too, I think.


In this case it wouldn't, because it's clear from the event/conditions, which one is meant..
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 How do I....?

Who is online

Users browsing this forum: Anonnymitet, gamecorpstudio, NECRONOMICRON, plinkie and 24 guests