Destroy event destroys any solid, not the one its meant to.

0 favourites
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Problem Description

    I want the player to destroy a sprite if he touches it, that works, but it also affects all other sprites, so all the sprite that the player touches are destroyed

    Attach a Capx

    goo.gl/PU2C4M

    Description of Capx

    Sprite1; Player. Has 8direction behaviour and solid behaviour.

    Sprite2; A sprite that has this lign of code in the event sheet; "Sprite1 on collision with Sprite2 -> Sprite 2 Destroy". Has solid behaviour.

    Sprite3; A sprite that has no code attached to it, so it shouldn't destroy. Has solid behaviour

    Steps to Reproduce Bug

    • Step 1 Make three sprites.
    • Step 2 Assign the solid behaviour to all three.
    • Step 3 Assign any movement behaviour to the first one, he'll be the player (8Direction in this case)
    • Step 4 Make this lign of code; "Player on collision with Sprite2 -> Destroy Sprite 2"

    Observed Result

    Sprite2 is destroyed when touched by the player, but also Sprite3 even if it has no code attached to it.

    Expected Result

    Sprite2 is destroyed when touched by the player, but Sprite3 isn't destroyed when touched by the player.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 10 version 1709

    Construct 2 Version ID

    beta r257

  • MrEdyFder Hi there, I have downloaded and tested your .Capx but with my version 244. So I can't tell if it's bugged in 257 or not.

    In 244 at least I don't see any bug. Here's a gif I made testing it:

  • So it seems to be a r257 only problem.

    I've seen that they've did some changes to the solids i think?

  • Yep, it also doesn't work on r257. I've checked the post about r257 and everyone has this issue. It's a lesson to scirra; always test updates, even betas!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Running into the same issue myself.

    Colliding with a food item (Sprite) is supposed to destroy it and make the player character green.

    But in r257, even the invisible walls (Tiled Backgrounds) trigger the "food item" collision event. Definitely caught me off-guard. Funily enough, tilemaps seem to be spared, my poor enemies and blocks can't say the same, though...

    I guess now is the time to work on older projects using a previous version of C2 while I await the new one... x)

  • I'm having the problem with Tilemaps so they aren't being spared.

  • Well... I guess I'm going to stick to Release 244 for now then...

  • Thanks for the minimal repro. It looks like a collision bug fix in r257 has broken some kinds of collisions. Hopefully this is what is behind the other reports of issues in r257. Should have it fixed soon.

  • Should be fixed in r257.2!

  • I'm still facing the same issue : as soon as one of my objects with a platform behavior lands for the first time, it causes a problem.

    The error message is different from last time, however :

    (I'm using the chrome browser)

    javascript error

    uncaught reference error : "a is not defined"

    localhost:50000/preview.js line 4610 (col9)

    Everything stops, but only visually, as I can still jump, hearing the landing sound afterwards

  • Same here.

    In my case, the level immediately loads with the above error. If i disable the platforming behavior on the player and enemies, the project will load. But if my player throws his weapon (which has a platform behavior that triggers on collision with a solid), I get the error again.

  • VonFirflirch

    Are you able to file a proper bug report with an attached .capx? My project is rather large (several hundred events). And at the moment, I can't reproduce the bug in a new project.

  • SeekerSK

    Nope, I'm nearing the 2000 events and in a similar bind. I did open a thread in the "How do I" category, out of desperation!

    At least we know it's not our fault, as I've tried playing with C3, and no problem there.

    I can't reproduce the issue on a new project either, although I've only made pretty basic tests thus far, I should take the time to do it more seriously tomorrow (less than ten hours from now, where I live), adding functions, having cross-eventsheets stuff happening and whatnot.

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