_Hoz_Follower = _this select 0;
_Hoz_Leader = _this select 1;
Hoz_ReleaseUnit = true;
_Hoz_LongDist = 150;
if !(leader _Hoz_Follower == _Hoz_Follower) then
{
[_Hoz_Follower] join grpNull;
};
_leftc = 0;
_leftg = 0;
_leftk = 0;
_leftd = 0;
_assigned = 0;
while {(alive _Hoz_Follower) && (alive _Hoz_Leader) && Hoz_ReleaseUnit}do
{
// If unit gets too far behind then wait until the follower is closer.
waitUntil {_Hoz_Follower distance _Hoz_Leader < _Hoz_LongDist};
if (vehicle _Hoz_Leader != _Hoz_Leader) then
{
_Hoz_VehicleTmp = vehicle _Hoz_Leader;
_leftc = _Hoz_VehicleTmp emptyPositions "cargo";
_leftg = _Hoz_VehicleTmp emptyPositions "Gunner";
_leftk = _Hoz_VehicleTmp emptyPositions "Commander";
_leftd = _Hoz_VehicleTmp emptyPositions "Driver";
hint format["%1 %2 %3 %4", _leftc, _leftg, _leftk, _leftd];
for [{_i = 0},{_i != count units group _Hoz_Follower},{_i = _i + 1}] do
{
if (_i < _leftc) then
{
(units group _Hoz_Follower select _i) assignAsCargo _Hoz_VehicleTmp;
_assigned = _assigned + 1;
};
if ((_i >= _leftc) && (_i < (_leftc + _leftg))) then
{
(units group _Hoz_Follower select _i) assignAsGunner _Hoz_VehicleTmp;
_assigned = _assigned + 1;
};
if ((_i >= (_leftc + _leftg)) && (_i < (_leftc + _leftg + _leftk))) then
{
(units group _Hoz_Follower select _i) assignAsCommander _Hoz_VehicleTmp;
_assigned = _assigned + 1;
};
if ((_i >= (_leftc + _leftg + _leftk)) && (_i < (_leftc + _leftg + _leftk + _leftd))) then
{
(units group _Hoz_Follower select _i) assignAsDriver _Hoz_VehicleTmp;
_assigned = _assigned + 1;
};
};
(units group _Hoz_Follower) orderGetIn true;
while {vehicle _Hoz_Leader != _Hoz_Leader} do
{
group _Hoz_Follower move [(getpos vehicle _Hoz_Leader select 0) + ((random(7))*sin(getdir vehicle _Hoz_Leader - 180)), (getpos vehicle _Hoz_Leader select 1) + ((random(7))*cos(getdir vehicle _Hoz_Leader - 180))];
sleep 2.5;
};
{unassignVehicle _x} forEach units group _Hoz_Follower;
};
if ((_Hoz_Follower distance _Hoz_Leader) < 3) then
{
sleep 2;
}
else
{
group _Hoz_Follower move [(getpos vehicle _Hoz_Leader select 0) + ((random(7))*sin(getdir vehicle _Hoz_Leader - 180)), (getpos vehicle _Hoz_Leader select 1) + ((random(7))*cos(getdir vehicle _Hoz_Leader - 180))];
sleep 2.5;
};
};
Heres the script. which part do i need to tweak to get them to be closer to the unitleader?