Hey thanks nox!
The problem it turned out was I was trying to do actor-wise comparisons inbetween for-each loops. So things were becoming confusing. I ended up turning my distance code into a really compact custom block GetDistance, which was called by another custom block, GetClosestActor. No attributes needed. After that the tick event just was implemented follow some pseudo code
I wrote while trying to figure out how to put it all together.
for each actor_on_screen
if actor_on_screen = target type && actor_on_screen != current_target:
if current_target = null:
current_target = actor_on_screen
otherwise:
current_target = get_closest_actor(self, current_target, actor_on_screen)
For anyone reading this, all this really says is if the actor on the screen is the right target type, but doesn't equal the current target, it means either current target isn't set or it is, and we should do a distance calculation.
In other words we arrived at roughly the same conclusion. Laughed out loud when I saw your reply this morning. Thanks Nox.