So, on this picture, blue is the player, red/purple are the enemies and yellow is the cross reticle that indicate which enemy is the target.
I added red and purple to the family "enemies".
When I press Z key, it picks the nearest object belong to enemies family. However, what I want, is when the V key is pressed, the yellow cross change to the next nearest enemy.
Once when the last enemy is focused, if V key is pressed again, then come back to the first nearest enemy.
I think I need to use something related with "uid", to pick and compare every enemy on the screen, but Im not too sure yet.
I was looking tutorials similar for this, but it seems there isn't one.