Home   Help Search Login Register  

Author Topic: Convoy problems.  (Read 2071 times)

0 Members and 1 Guest are viewing this topic.

Offline SgtWolf

  • Members
  • *
Convoy problems.
« on: 02 Aug 2007, 20:17:09 »
I suspect more than likely everyone here has found this a problem, I think.  Basically it's proving almost impossible to have a smooth running convoy that may have to turn down the odd street.  The Ai has a lovely habbit of backing the trucks up a few feet after coming to a stop, then drive forwards, then reverse and put it onto the grass, then go forwards and stop.  Finally once you get to the corner, they tend to cut the corner dramatically and also will suddenly stop and then very slowly steer and move very slowly, then reverse, then turn slowly again and move slowly etc.

I have tried both either by grouping the drivers together to follow the 'leader' of the convoy and individually waypointing the convoy vehicles and setting a wait time before the set off so that they don't try to race each other.  Both have the same troublesome effects.

It's driving me nuts.  Is there any way to get around this problem?  :confused:
« Last Edit: 02 Aug 2007, 20:20:12 by SgtWolf »

Offline firecontrol

  • Members
  • *
Re: Convoy problems.
« Reply #1 on: 02 Aug 2007, 20:25:00 »
I've been able to get a decent convoy effect by grouping them, setting them on safe, and putting waypoints down like mad. Any slight curve, I add a waypoint, almost cover the entire route with waypoints. Tedious, but it's somewhat workable from what I've seen.

Usually how I do this is through markers and scripts, though. With some move orders, waitfor distance to marker < 10, move to next marker, etc. Like above, the entire road is covered with "empty" markers.

Offline peyres123

  • Members
  • *
Re: Convoy problems.
« Reply #2 on: 02 Aug 2007, 23:15:54 »
yep, its a real pain in the ass, and most of the resulting convoys move and behave in random ways each time, so it's hard to try and implement workarounds.

Really we need another patch to sort these sorts of issues out. I seem to remember convoys being better in Flashpoint.

Offline SgtWolf

  • Members
  • *
Re: Convoy problems.
« Reply #3 on: 02 Aug 2007, 23:17:46 »
I think the convoys in OFP responded better too.  At least they didn't want to go for a little paddle in the water at every opportunity that involved a bridge!  :confused:

I've been able to get a decent convoy effect by grouping them, setting them on safe, and putting waypoints down like mad. Any slight curve, I add a waypoint, almost cover the entire route with waypoints. Tedious, but it's somewhat workable from what I've seen.

Usually how I do this is through markers and scripts, though. With some move orders, waitfor distance to marker < 10, move to next marker, etc. Like above, the entire road is covered with "empty" markers.

Righto, I'll be sure to give the waypoint idea a try.  I don't know enough about scripting to be able to script a route using markers unfortunately.

Offline firecontrol

  • Members
  • *
Re: Convoy problems.
« Reply #4 on: 03 Aug 2007, 00:34:22 »
Code: [Select]
//convoyGo.sqf

_totalWPs = _this select 0;
_i = 1;

while {_i <= _totalWPs} do {
    call compile format ["leadDriver doMove (getMarkerPos ""WP%1"")", _i];
    call compile format ["waitUntil {(leadDriver distance (getMarkerPos ""WP%1"")) < 10}", _i];
    _i = _i + 1;
};

if (true) exitWith {};

EDIT: Of course I forgot to add that you need to name the driver (or the vehicle if it wasn't created empty) "leadDriver" for this to work. This should be the leader of the convoy group. Change the name accordingly.


Call this with, as an example: handle = [10] execVM "convoyGo.sqf"

On the map, set the markers up as type "empty" (This first empty in the list, btw) so they don't show on the map. Name them WP1 through WP10 in this example. It will probably be much higher for a long trip.

So let's say you have a nice marker-trail set up, 25 markers, named WP1 through WP25... call the script with:

handle = [25] execVM "convoyGo.sqf"


That should(tm) work. I just wrote it up while at work tho, so I can't test. Let me know if this works any better for you.
« Last Edit: 03 Aug 2007, 02:15:04 by firecontrol »

Offline SgtWolf

  • Members
  • *
Re: Convoy problems.
« Reply #5 on: 04 Aug 2007, 16:51:19 »
I've given it a go, and it sort of does work although the driving is very stop start like.  However, another issue with it is that it only works with one unit.  No other units in the group would follow the leader with this script running.

Offline firecontrol

  • Members
  • *
Re: Convoy problems.
« Reply #6 on: 04 Aug 2007, 19:24:17 »
May have to change "doMove" to "move" and change "leadDriver" to the group name.
As far as starting and stopping, try adjusting the distance in the "waitFors"... up to 20, 50, etc.
Needs some experimentation.