Counting the number of objects that collide with each specific object

There are sprites of our units and the enemy, when the enemy collide with ours, the animation is played, on a specific frame, the events of taking away the variable life occur. How can I check the number of objects that have collided with a particular unit?

Increment (add 1 to) a scene variable with each collision.

Or, if you want to get how many objects are colliding at once with a unit, use PickedInstancesCount([object]):

I guess I didn’t put it that way. I tried your solution right away. The problem is the uniqueness of each sprite (unit)


Figured it out, the bug was checking the collision condition before each sprite’s unique ID.