How does collision condition "choose" which to delete when multiple are in collision?

Okay mostly this is about how the engine “picks” what objects applies to a condition… I’m probably wording this incorrectly … basically I have multiple instances of an object that move about on their own. Each has a separate timer and after some point there is a condition that checks that timer and if its reached AND the object is in collision with another it deletes it (rather it appears to delete two at least).

Deleting both is fine bc I am then going to spawn a different object in. My question is: if other objects are there also, will it also delete those? Or will it only delete just the one it’s checking & one of the ones it’s in collision with? Would it check for multiple collisions? If so how would I prevent it from deleting anything other than two of them (the one with the variable that has reached the point at which the event triggers and the ‘other’ one). Essentially want it to just delete two, but not others if they’re also in collision.

I’m really just doing a “my first muck-about” to learn how this thing works but I wanted to double-check if anyone knows how the game engine “chooses” which object to delete if it is checking for collision? If a bunch of these object end up “in a pile” could it be checking/deleting all of them at once & potentially cause an issue & if so I will need to figure out a way to avoid that (am extreme noob at this & absolutely no programming experience).

I suppose a way around it would be to have the game choose at the point of collision to bounce them apart or merge them. Eventually maybe but for now just want to learn how this thing works.

Only if:

  1. the other objects are specified in a delete action, or
  2. the other objects are in an object group that is specified in a delete action

GDevelop will only delete the objects that meet the all the conditions and are specified in the delete action. If an object meets one condition but not the other, then it won’t be in scope for any actions.


Same thing here - if they meet the conditions then they are in scope for the actions. If you just want to delete one out of many instances of the same object, then you can use “pick random object” or “pick object closest to…”


My suggestion is to try things out, and start a thread if there’s something you’re not sure of or don’t understand.

Thank you for the advice, the “pick object closest” to might work I’ll have a play with the idea. So far it does seem like it’s only deleting the two objects at once, but having some control & knowing how the controls work will help. I’m mostly getting the feel of the set up currently, learning as I go.