I think the best, safest way to achieve that is to create trigger which will fire periodically and order the scout to move a little bit forward (or move the scout itself directly). The downside is the added complication of keeping track of everything. You can see method to periodically work with multiple scouts in this tutorial

Visualize: Dynamic Indexing .

Another way is to calculate aa_TempPoint2 rather than assigning it to just some distance. For example, you can do the following:

1. Calculate the angle from the caster to each map corner (map corners as in North East, North West, South East, South West), and compare those to the caster's facing angle. That way you will find which side your scout will reach.

2. You now have a right triangle where you want to find the hypotenuse, and you have the length of the triangle side next to it and the angle between them. In short, you can calculate the distance between the caster and the side your scout will reach by simple subtraction, and divide that number by the sine of the facing angle (after making it in the range of 0-90 degrees).

This way you can find a safe offset distance to assign aa_TempPoint2.