First of all, here is the capx
I started off the "tower defense template", so there are lots of useless thing for the example.
There are 2 types of enemies, one red and one green, spawning randomly. there is a debug at the bottom of the screen, displaying when a turret acquires a new target the target position, and the instance type.
There are 2 ways to do it, I did both in the capx (just un-comment the second one to test it out).Solution 1
If you have a finite number of enemies (not too high), you can do a pick by UID like you said, and do one for each enemy type. If the current Target isn't of the type you first pick, it will return false, and the runtime will go to the next event, checking next enemy type. Problem, lots of code to copy past for each enemy.Solution 2
Families (need the personal version at least)
Put all your enemies in the same family, and then you can pick the current target as a family. You will then be able to access all of family parameters. This means you will have to move your variables from the enemies to your family if you want to access them.
I hope this helps !