I've wrote one (Beta) last year by coincidence, I was aiming for a randompatrol script...
Here it is :
;________________________
;::::::::::::::::::::::::
;
;scattermove
;author <Blanco>
;created 16/07/2003 1:46:13
;________________________
;::::::::::::::::::::::::
_Group = _this select 0
_center = _this select 1
_radius = _this select 2
_GroupLeader = Leader _Group
Scattermove = false
_mx = getpos _center select 0
_my = getpos _center select 1
#start
?count units _Group == "!alive _x" count units _Group: goto "exit"
?!(scattermove) :"_x commandMove [(_mx + Random (2 * _radius) - _radius), (_mY + Random (2 * _radius) - _radius), 0]" ForEach (units _Group)
@unitready _groupLeader
;hint "move out"
~5 + (random 5)
goto "start"
#exit
exit
Three params :
- Name of the group (group)
- Name of the centerpoint ( object)
- Radius ( number)
eg1 : [groupALpha, tent, 150] exec "scattermove.sqs"
eg2 : [group this, (object 12345), 100] exec "scattermove.sqs"