Jump to content
Sign in to follow this  
Psilocybe

Convoy through city

Recommended Posts

Hi guys.

So I just downloaded the molatian militia addon and it got me hungry for some BHD fun in either falujah or perhaps Porto, of course some waypoints will leave a lot to be desired.

Unless I'm mistaken, unitcapture is only really for flyers so I guess I can rule that out, is there any way I can get the convoy to keep on trucking at all costs through a hostile city?

By the way I did attempt to search for this with no luck.

Share this post


Link to post
Share on other sites

Hi,

Well I used the DTM convoy manager for MCC. It's working great the convoy will keep on moving even unfer fire but if the lead vehicle is down they will disambark and negotiate.

Ps setCaptive will work for any unit.

/ =========================================================================================================
//  Convoy  control
//  Version: 1.6
//  Author: DTM2801
// =========================================================================================================
// - to tweak the behaviour change the distance (example: _dist > 80) or forcespeed (example: forceSpeed 0).
//
// example using only controlscript with vehicles and named on the map: 	
// veh1:	first vehicle nothing
// veh2:	null = [veh2,veh1,false] execVM "convoy_control.sqf";
// veh3: 	null = [veh3,veh2,false] execVM "convoy_control.sqf";
// veh4:	null = [veh4,veh3,false] execVM "convoy_control.sqf";
// and so on
// to enable/disable debug change option 3 to true/false
// =========================================================================================================

private ["_units", "_convoy1", "_convoy2", "_debug", "_unit1", "_unit2", "_dist","_count","_c","_convoyArray"];

_convoyArray	= _this select 0;
_c 				= _this select 1;
_count 			= count _convoyArray;
_convoy1 			= objNull;
_convoy2 			= objNull; 
_convoy1 = _convoyArray select _c; 
_convoy2 = _convoyArray select (_c - 1); 

_debug = _this select 2;

_units = [];
_units = _units + [_convoy1, _convoy2];
_unit1 = _units select 0;
_unit2 = _units select 1;

while {alive _unit1 && alive _unit2} do {
_dist = (_unit1 distance _unit2);
if (_dist > 50) then {_unit2 forceSpeed 0; if (_debug) then {hintsilent format ["%1 waiting for %2",_unit2,_unit1]};};
if (_dist < 45) then {_unit2 forceSpeed 2; if (_debug) then {hintsilent format ["%1 front slowding down 2",_unit2]};};
if (_dist < 40) then {_unit2 forceSpeed 5; if (_debug) then {hintsilent format ["%1 front slowing down 4",_unit2]};};
// preffered distance
if (_dist < 35) then {_unit1 forceSpeed 8;_unit2 forceSpeed 8; if (_debug) then {hintsilent format ["%1 & %2 \nin formation",_unit1,_unit2]};};
if (_dist < 30) then {_unit1 forceSpeed 8;_unit2 forceSpeed 8; if (_debug) then {hintsilent format ["%1 & %2 \nin formation",_unit1,_unit2]};};
// ----------------------------------
if (_dist < 25) then {_unit1 forceSpeed 5; if (_debug) then {hintsilent format ["%1 back slowing down 4",_unit1]};};
if (_dist < 20) then {_unit1 forceSpeed 2; if (_debug) then {hintsilent format ["%1 back slowing down 2",_unit1]};};
if (_dist < 15) then {_unit1 forceSpeed 0; if (_debug) then {hintsilent format ["%1 waiting for %2 to move",_unit1,_unit2]};};

if (_debug) then {_unit1 sideChat format ["dist %1, to front %2",_dist,_unit2];};
sleep .5;
};
//failsafe
if (alive _unit1) then {_unit1 forcespeed -1; if (_debug) then {hintsilent format ["%1 gone, %2 without control",_unit1,_unit2]};};
if (alive _unit2) then {_unit2 forcespeed -1; if (_debug) then {hintsilent format ["%1 gone, %2 without control",_unit2,_unit1]};};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×