Set distancepoint = (Distance between (Position of (Triggering unit)) and (Position of (Triggering unit)))
distancepoint is a real variable. Then find 'Math - Distance between points' and do whatever u need to do after words
edit - and if you wanted to create a unit for every 100 units, then do
Set unitspawn = distancepoint / 100 |