Thanks for your suggestions so far.
You're welcome. BTW I made an error in the second code above, it should be
_loon1locx = (getpos loon1 select 0) - (getpos radiotower select 0)
_loon1locy = (getpos loon1 select 1) - (getpos radiotower select 1)
loon1 setpos [(_newloc select 0) + _loon1locx, (_newloc select 1) + _loon1locy]
Where radiotower is the name of the object that the loons were patrolling around originally. The first two lines get the relative distance to radiotower, the third line puts loon1 at that same relative position to _newloc.
As for your randomness problem, I don't know what's going wrong, it looks like everything should work. Check for dumb errors, like the one above.
For example, make sure flagA has been defined correctly, etc.
EDIT: LOL, I know what the problem is. Everything is fine until you get here:
#obj1rand0
flag1 setpos getpos flagA
#obj1rand1
flag1 setpos getpos flagB
exit
The engine will continue reading even after the setpos getpos flagA, and so it will always set it to flagB immediately afterward! So either way, it ends up at flagB.
What you need is an exit before #obj1rand1 :
#obj1rand0
flag1 setpos getpos flagA
exit
#obj1rand1
flag1 setpos getpos flagB
exit
Tested in the mission editor, it should work now.