Destroy with Pinned Object not working??

0 favourites
  • 2 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • The scenario occurring here is that I have a "CreatureCollision" object that occasionally spawns a "Damager" object, in this case a sprite that shows a "bite" animation.

    This issue has me convinced I am losing my mind. I have verified and re-verified the following:

    1. "Destroy with Pinned Object" is turned on for "Damager" object.
    2. Neither the pinned "Damager" object or the family it is in has any event that turns off "Destroy with Pinned Object". I don't use that action anywhere in the entire project
    3. Once pinned, "Damager" is never unpinned. I don't even use the "unpin" action in this project anywhere.
    4. The "Damager" object is pinned to the correct "CreatureCollision" object, and the "CreatureCollision" object it is pinned to is being destroyed.

    Despite this, if I destroy the "CreatureCollision" object while this "Damager" object exists and is pinned to it, the "Damager" does not get destroyed with it:

    The floating teeth are abandoned "Damagers" that had their "CreatureCollision" objects destroyed.

    I have several destroy conditions for "Damagers", these include destroying the object after a certain duration, destroying the object after a certain distance has been travelled, and destroying the object after certain tweens have played.

    For these particular "Damagers", they should be destroyed after a "shrink" tween plays (which they do fine if their "CreatureCollision" object is not destroyed) and the aforementioned "Destroy with Pinned Object".

    I'm kind of at my wit's end here. Any suggestions on what I should be looking for that could possibly interfere with something as straightforward as "Destroy with Pinned Object"?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So... this issue has become weirder.

    I've spent the day trying to troubleshoot this issue with no luck. The "Damager" object still does not destroy with it's pinned "CreatureCollision" object.

    Now, because "Damager" is a multi-purpose object that can be used for a variety of attacks (projectiles, melee, area of effect, etc) it has a number of behaviors that I simply disable/enable to fit my needs.

    For giggles I removed the "Orbit" behavior from "Damager". I wasn't using it yet for any attacks, and I figured MAYBE it was interfering with the Pin behavior because they share Pin features. I dunno, I'm grasping at straws here.

    Anyways, this resulted in something I've never seen, the next time the "Damager" object glitched, it remained visible as usual... but disappeared from the debugger and no longer interacts (I.E. damages the player:

    As you can see, there are NO instances of "ParentDamager" or its "DamagerFamily". But its right there, and there are no objects that share this sprite. It's not a side of a 3D object either, it is JUST a sprite.

    Does anyone have ANY suggestions on what I should be looking at to fix this? Is this just a straight up bug?

    EDIT: One last update on this for anyone that ever runs into this as well. I was not able to replicate this in another .capx, so I don't know what bizarre collection of settings/behaviors/actions lead to this, but I can tell you how I "fixed" it.

    I think that the issue may have been a scale tween that was set to "Destroy on Complete". Something must have been interfering with it and preventing it from completing (Possibly the "destroy with pinned object?"), but that doesn't explain the above debugger weirdness.

    Ultimately I just circumvented this by unchecking the "Destroy on Complete" box in the scale tween, and slapping a timer that is the same duration as the tween, but destroys via an action.

    TL;DR, I don't know what caused this but I can tell you how to work around it, if anyone has any more insight or suggestions I'd love to hear them.

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