Problem with collision detection

Get help using Construct 2

Post » Mon Feb 23, 2015 6:32 pm

Hello,

I'm currently going crazy over something. I have problems with collision detecting.

I tried using different images, even simple blocks for the enemy, but the player torpedo's just won't hit the enemies no matter what. U96 (enemy) is creating the problem.

U99 works just fine. Could it be a bug? Or can Construct 2 not handle two objects colliding with the same object? Torpedo3 is the object colliding with U99, U992, U96, and U962. The latter two just won't be destroyed upon collision (which doesn't seem to happen).

What things are there to check to see what's the problem?
You do not have the required permissions to view the files attached to this post.
B
13
S
7
G
4
Posts: 143
Reputation: 3,581

Post » Mon Feb 23, 2015 6:50 pm

Ok so obviously you always find it right after you post a new topic.

Turns out the polygons for the enemy graphics were all messed up. I never knew about collision polygons.
B
13
S
7
G
4
Posts: 143
Reputation: 3,581

Post » Tue Feb 24, 2015 4:03 am

https://www.scirra.com/manual/149/function

I think you need to read this. Let me know what you think.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Tue Feb 24, 2015 11:32 am

Hey thanks, is this about improving events?

The examples seem to be missing on that article though, they just say 'Function example 1' etc.
B
13
S
7
G
4
Posts: 143
Reputation: 3,581

Post » Tue Feb 24, 2015 11:43 am

Rudi55 wrote:Ok so obviously you always find it right after you post a new topic.

Turns out the polygons for the enemy graphics were all messed up. I never knew about collision polygons.

just go to each character you have and select guess polygon shape will automatically create the polygons for the image if they are in png format and have transparent background.


i wold suggest you to do 1 call function call for the destroyng the enemys and adding score, just add create a function any name u like, add the events there, keep ur enemys destroy part but the one that says add to and play sound move it in the events for function then when de enemy is destroyd just call the function this way it saves u for rewriting all those 6 /10 lines of action stuff u have there
B
76
S
22
G
69
Posts: 1,353
Reputation: 43,833


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, Lancifer and 27 guests