How do I delete object on collision

1 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • I have a button that creates ball.

    This ball fly around the screen, and whenever it hits red box it should be destroyed.

    The problem that whenever I try to destroy this object, it destroy all others objects of this kind. In other words, clicking the button creates new object of ball, thus unlimited number can be spawned, however I require to destroy only ones that come into collision with the red box.

    Could anyone help me to solve this issue?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If two objects collide it should only destroy one of this objects not all instances. It depends of your action which object gets destroyed.

    The event should look like:

    Ball | On collision with Box -> Box| Destory.

  • try switching the event around. it likes to be tempermental sometimes.


    Box - On Collision With Ball- Destroy Ball

    may have a different outcome than

    Ball - On Collision With Box - Destroy Ball

    i believe the logic behind it is: If THIS box comes in contact with any ball, destroy all balls

    If THIS Ball Touches any box, Destroy THIS ball.

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