In one of my projects, I had an object called "Keypress" that showed an image of a keyboard key to press whenever you approached certain locations/characters.
In the layout, there were multiple instances of the Keypress sprite; each Keypress had an instance variable named "Which."
So, related to KSLR's idea above, say for each enemy you have a pimple, and Pimple.Which is set to the name of the enemy. Whenever Pimple is hit, it calls a function with the value of Which.
PimpleHit("Which") assigns damage wherever you're keeping track of it.
This isn't dissimilar to using the UID, but I find that having a name makes it more human-readable.