A question about the collision in top down shooter

  • 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.

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

    Edit: Replaced colliding with overlapping.

  • 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?

  • 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

  • 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 <img src="smileys/smiley2.gif" border="0" align="middle" />

    Edit: downloaded and run the capx, noticed you've already done that... Will keep trying :)

  • Yes they are solid. That is what's bothering me, they are NOT supposed to overlap.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That is a very great solution but what about the enemy4 with enemy4?

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)