Breaking wall problem

  • I'm trying to create a wall that breaks on collision with the player sprite. If multiple walls are stacked in line next to each other, the explosions will also break all the other walls they collide with.

    I'm currently having two problems with this setup:

    1) All the wall breakings activate, but only the first breaking wall spawns the explosion sprites correctly. All the other walls spawn multiple instances of the explosion sprites on same places.

    2) For some reason, when I move the walls a little bit to the left, the wall breaking doesn't work at all anymore.

    Please see the attached capx, I've set up two layouts to showcase each problem:

    https://www.dropbox.com/s/f01g7xi7s5q2kpe/breaking_wall_problem.capx?dl=0

    If anyone has time to look at the capx and help out that would be greatly appreciated (this was supposed to be a quick 15 min implementation and I've now wasted several hours trying to solve it ). Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • https://www.dropbox.com/s/2v0a6lxqsqi0p ... .capx?dl=0

    1) fixed, see the event sheet.

    2) I don't know why this is happening. I'm guessing if the wall is located in this exact position, then the Solid behavior stops character sprite before collision event is registered..

    Anyway, the easiest way to fix it is to slightly alter the collision polygon of the wall sprite.

  • 1) fixed, see the event sheet.

    2) I don't know why this is happening. I'm guessing if the wall is located in this exact position, then the Solid behavior stops character sprite before collision event is registered..

    Anyway, the easiest way to fix it is to slightly alter the collision polygon of the wall sprite.

    THANK YOU!!!

    Works exactly as should now, I'm grateful for you for taking the time to help.

    Adjusting the collision polygon slightly also seems to fix the second problem as well

    Thanks again, this helped me greatly!

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