A question about the collision in top down shooter

Get help using Construct 2

Post » Wed Aug 14, 2013 7:34 am

Hello everyone!
I am a lifelong construct 2 user and I've never encountered a problem like the one I am having at the moment.

The problem is simple, however the solution might be more complicated:

How can I prevent the enemies from from overlapping?

I uploaded the prototype of my game because it wasn't even that comepeleted.

Here is the link to the problem. Will elaborate if necessary.

https://dl.dropboxusercontent.com/u/66191580/Problem.capx

Edit: Replaced colliding with overlapping.Amirrezapsp2013-08-14 20:27:40
B
3
Posts: 8
Reputation: 293

Post » Wed Aug 14, 2013 11:35 am

@Amirrezapsp

I'm not sure what you mean here as the enemies are not colliding with each other, but overlapping. They do not collide, bounce off each other etc so what are you expecting to happen?
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Wed Aug 14, 2013 8:28 pm

Oh yes! My mistake I mean overlapping. I do not want the enemy to overlap due to the fact it is extremely unrealistic and amateur
B
3
Posts: 8
Reputation: 293

Post » Thu Aug 15, 2013 12:20 am

Stupid question, but have you tried giving them the "solid" behavior?

Also, could add "Enemy - on collision with - Enemy - Rotate 10 degrees" or something along those lines.

I'm still an amateur with Construct so forgive me if I'm wrong

Edit: downloaded and run the capx, noticed you've already done that... Will keep trying :)ReanimtedNerd2013-08-15 00:25:32
B
11
S
1
Posts: 40
Reputation: 485

Post » Thu Aug 15, 2013 1:15 am

Yes they are solid. That is what's bothering me, they are NOT supposed to overlap.Amirrezapsp2013-08-15 03:06:56
B
3
Posts: 8
Reputation: 293

Post » Thu Aug 15, 2013 2:12 am

@Amirrezapsp

He wasn't calling your question stupid. After looking at this for ages I have no idea how it's so screwed, however I came up with a nice fix.

Add 'when Enemy collides with Enemy4, stop Enemy'. Enemy will then stop upon touching Enemy4 and then continue to follow path once Enemy4 moves, which simulates collision.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Thu Aug 15, 2013 3:07 am

That is a very great solution but what about the enemy4 with enemy4?
B
3
Posts: 8
Reputation: 293

Post » Thu Aug 15, 2013 8:34 am

@Amirrezapsp

When Enemy collides with Enemy4, stop Enemy
When Enemy4 collides with Enemy, stop Enemy4
It wasn't clear what your intention was with two objects named Enemy and Enemy4. If you plan to have two different enemy types that spawn you can put all Enemy objects into a family called 'Enemies' and say if 'Object from Enemies' is colliding with 'Object from Enemies' then stop
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187


Return to How do I....?

Who is online

Users browsing this forum: David181, jorgmaquoi, unicornspitfire and 30 guests