Destroy Single Instance of Bullet/Projectile

This forum is currently in read-only mode.
  • alright,

    so i have wall mounted guns / cannons,

    which shoot at given time intervals.

    i want to make them so that when they hit a solid object, the bullet will destroy.

    it works, but it also destroys other instances of the bullet,

    how can i avoid this?

    and make it only destroy the instance that is overlapping/"collisionig"?


  • Use the group attribute "Solid" in the condition:

    + bullet: On collision between bullet and "Solid"

    -> bullet: Destroy

    This definitely only destroys the instances that are colliding.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • do you mean families?

    yeah i have the solid objects into a "solid" family.

    and what i did was:

    bullet on collision with solid, destroy.

    but it still destroys all other instances, did i miss something?

    on the bullet expressions i only get compare speed, exceeded range, and step

  • No, I don't mean families. You can directly test against the attribute solid.

    Select the bullet sprite and use its "on collision with another object" condition. On the parameters page click on "pick an object". The list that opens is catagorized. Further down the list you will find the category "Attributes", where you can select "Solid". Of course, this option only appears if at least one of all the objects has the attribute "Solid" (which you can activate under Properties/Groups/Attributes of the sprite's properties panel).

  • oh, silly me, i misunderstood you and kept checking for families,

    i switched to the solid attribute, and though it didnt work on the current project, i tried reacreating it in a new file, and it seems to work.

    i've uploaded the new example -

    btw what is the practical difference between attributes and families?

    anyways, thanks tulamide, always so helpful!

  • btw, i redid the layout and it seems to work just fine now,

    thanks again

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