I want to take a subset of instances and get the min distance to an object.
so...
Pick all Sprite1 AND Sprite1.isEnabled = true
so let's say I have 20 Sprite1s and this line above picks 10 of them
now I want to find which of those 10 Sprite1s is closest to a particular x/y (let's say Home).
Pick Sprite1 where min(distance(Sprite1(0).x, Sprite1(0).y, Home.x, Home.y),distance(Sprite1(1).x, Sprite1(1).y, Home.x, Home.y), etc..
the problem here is I am referencing each instance directly and not filtering the instances that are Enabled=false
how do I apply the min expression to a subset of instances??
Thanks...