# Can I scale an object based on the relative distance to another object?

I have a series of empties (let's call them scale_empties) that scale separate portions of a mesh. I would like to use a separate "master_empty" (or other object) to travel over the scale_empties and, as it does, scale the underlying scale_empties based on how close the master_empty is... Sorta like this...

Start position:

As the master_empty travels, it scales the scale_empties:

Anyway... the goal is to allow one or more master objects to travel along a series and scale as they go.... Possible?

Image below shows driver added to x scale of Empty.002. The driver variable var is of Distance type and returns the distance between itself (Empty.002) and the master empty (Empty.001).
The expression 4 - var if var < 2 else 1 is set up such that if the empties are within 2 bu of each other the scale value is (4 - var) and if outside that range the scale is 1. Change the numbers to suit.