Yes it should, but that enemy is a "family" composed by several enemies so I am telling it when you collide with any enemy of that family. If this logic would not work, then why does it work on the first drawn instance of it, should it not work like on all instances? Instead it always chooses to pick the x references of the first enemy, not the second or the third.
The global variables mentioned in that image have nothing to do with the enemies, they are used to keep the player behaviour in check.
The question I have been trying to ask is exactly the one you are asking.
How do I tell it to first of all, only take in consideration the x of the closest enemy, not of the first enemy drawn on the layout.
This:
How do I tell it "the instance of the enemy hitting" or "the closest enemey hitting"?
The second one, regarding damage, can wait, I want to solve this one first.