Deleting same object in collision


I have a collision check here between two objects, Ball and BallCollider. When a ball touches a ballcollider with a different id, but same value, it should delete the original ball and multiply the new balls value by two (like in 2048). However instead of this happening, even though the new ball does multiply its value the original does not delete. Here are my events to create these objects as well.

Please help with this and ask any clarifying questions if needed.

I think your problem lies here:

The ball in the “Take into account...” expression is limited to the one that collided with the BallCollider and has a different Id. Because the two are not linked, it never selects the correct Ball object.

Instead, to the subevent add the conditions to pick all Ball objects and take into account all Ball objects linked to collider:

image

Hey sorry if im not supposed to reply after the initial problem is fixed but I have another issue with this, here is the example link (here) . Currently you can only swipe towards right on the top row, to make simpler for testing. Keep doing that you will see the issue. Here are my events