Special Lock On in Developer Help
Give the enemy one image to represent its graphic (to be reused by any player(s)). Override the enemy's Move() or turf/Entered() to check for nearby players (to display the image to them) andfor players who have targeted the enemy but are now out of range (to un-display the image to them...) after it moves to a turf.
mob/enemy var/image/lockonmob/player var/mob/enemy/locked_on_target Move() . = ..() //do the default action and keep its return value if(. && src.locked_on_target) //if movement succeeded and we have targeted something if(get_dist(src,src.locked_on_target) > 4) //if we're out of range... src.client.images -= src.locked_on_target.lockon //un-display the image //return . //(this is done impilcitly)
if(get_dist(src,src.locked_on_target) > a.reactable_dist || src.z != src.locked_on_target.z)