Jump to content

Recommended Posts

1-You can do that actually already. Set the markers to that town. When convoy reaches there they will stop. Create a trigger which will start convoy again based on criteria you wanted (i.e. convoy is in town and enemy moved to city A)

2- I could make it adjustable but I don't want to end up like vanilla convoys where vehicles start bumping each other :) So 40 meter is running smooth as far as I see

 

a) I do not want to confuse AI with WPs

b) What do you mean exactly?

 

Share this post


Link to post
Share on other sites

Actually I also think using WPs would be better but only for planning the route.

sort of like this.

Place waypoints for the first vehicle and set them up as needed then you need to convert the WP's to  markers, you need to give them a name and store in a variable.

Better still would be to store all the waypoint info in an array and that to could be applied  at each position .

Then delete the waypoints so they won't cause issues for the AI.

You would end up with a system that on the surface would be the same as default.

 

I did a little test by deleting the init.sqf and calling this script from lead vehicles init.
 

//null=this execvm "Wp_Mkr.sqf";// placed in lead vehicle init.
[] execVM "Convoy\ConvoyInit.sqf";
_inc=0;
wparray=[];//waypoints array
{    
    _markerwp = createmarker ["mkr_"+str _inc,waypointposition [group _this,_inc]];// create marker at waypoint positon
    _markerwp setmarkertype  "mil_circle";
    wparray pushback  ("mkr_"+ str _inc);// store markers in array
    _inc=_inc+1;
 } count (waypoints group _this);
    
{
    deleteWaypoint ((waypoints group _this) select 0);
} foreach (waypoints group _this);// delete waypoints
    
sleep 1;
handle = [wparray,[prowler, truck_1, truck_2], 30, 600, 2, "NORMAL", "CARELESS"] spawn DEVAS_ConvoyMove;

This only converts wp positons to markers.

 

 

Share this post


Link to post
Share on other sites

If I switch to that then people will try to go beyond like putting code inside WPs, try to skip or activate them triggers etc. and then report here issues which are actually no issues :/
 

Share this post


Link to post
Share on other sites

Is it possible to make it more random? Instead of creating a convoy by placing units and markers on the map, it would be nice to have a array of units/vehicles from wich the script would choose few random units/vehicles, then randomly create astarting point and a route, and then either delete all units/vehicles or create new random route for them when they reach theyr final destination.  There is a script, that does similar thing to simulate civilian trafic. i thing is called Enigma traffic.

Share this post


Link to post
Share on other sites

yes it is possible to do such thing but you need to code the random creating, random markers and deletion at the end (can be done via convoy_end.sqf easily). When you code that, all you need to do is calling my script with correct parameters

  • Thanks 1

Share this post


Link to post
Share on other sites

Nice work on this convoy script, it's really good! I'm just having one little issue with trucks though, they keep stopping every 10-20m for about a second and then start moving again. Because of this they keep up an entire convoy unfortunately. Tested with Tempest and Zamak transport trucks. When placing one of these in editor with a normal waypoint the trucks move normally. Tested the script with all different speed modes and behaviours. Changing max speed also doens't seem to solve it. Other vehicles like Tanks, APCs and MRAPs move normally with same setup.

 

Any suggestions?

 

Thanks!

Share this post


Link to post
Share on other sites

Hey there.

 

This script has finally allowed me to make proper convoys! Sure, the vehicles´ movement is slightly choppy sometimes, but it is a joy to watch them move reasonably fast across large distances while staying in formation. I do have a couple questions, though:

 

1- How would I get the infantry in the convoy to disembark and go do their own thing once they have been carried to the last marker? Does this involve writing stuff in the ConvoyEnd.sqf, or can one use triggers and/or waypoints to make that work? Duke101´s post in page 2, is it good?

 

2- If the convoy is ambushed, is there a way to interrupt the script and have vehicles and infantry obey standard trigger/waypoint orders? I believe Norrin´s version allowed one to decide if the convoy should get back into the vehicles once an ambush was ended.

Share this post


Link to post
Share on other sites

1- Yes exactly. That script is an open end script to allow you to do whatever you want when convoy reaches the final point

2- Give some more info. What exactly you need when ambush is finished? My code lets them to follow the initial plan when they survive

Share this post


Link to post
Share on other sites

Ok, let´s get specific then:

 

An OPFOR convoy composed of one armed UAZ, two trucks with infantry and another armed UAZ heads towards a destination where it will engage independents. However, on the way there, the convoy is likely to go through an area where OPFOR and independents already shot at each other. What I´ve seen happen is that the convoy will stop where that firefight happened instead of moving on. Now, I have VCOM AI on, but I have turned it off on the vehicles and infantry riding in them, and the OPFOR in the area are dead before the convoy gets there. Then, infantry will enter a get-on/get-off loop with the guys getting into the trucks, then back out, then in again.

 

So I figure that I can fix this problem by:

a) having the infantry disembark before there is an ambush on the convoy and let them move on (so, putting the last movement marker well before the ambush), or

b) have the infantry disembark during an ambush (and not try to get back into the vehicles afterwards) in a way that lets the infantry simply move on with the basic Arma 3 waypoints system.

 

But in the end, what I absolutely want/need to happen is that either the whole convoy OR the infantry it transports get to their destination.

 

I´d settle for whichever solution is the simplest, but since I´ll be editing missions for my Arma 3 clan (and it is forbidden to use Zeus to spawn or control units, I´m guessing due to power-tripping mission editors in the clan´s past), the more I learn, the more variety I can put in the missions we´ll play.

Share this post


Link to post
Share on other sites

Your workaround solutions are fine but there should be no get in get out loop if there is no alive enemy around.. They only disamberks if someone attacks them or somehow they get injured.


Btw, I like missions where there is Zeus as it makes it more challenging and also not to have the guy who build the mission in a fireteam who knows what will happen when..


 

Share this post


Link to post
Share on other sites

Alright. So to check I´m on the right path:

 

Let´s say my convoy has five markers, the last one being "m5". The infantry I want to disembark are "inf1" and they are riding in "truck1", and they will be heading out towards combat. I would then want to create a marker, let´s call it "m6". Then, I put this in ConvoyEnd.sqf

 

Quote

if(_ConvoyID == 1 && _LastMarker == "m5") then
{    
    _inf_groups = group (driver truck1);
    {
        _x action ["GetOut", kamyon_1];
        [_x] allowGetIn false;
        if(! group _x in _groups) then { _groups = _groups + [];}
    }    foreach crew truck1;


_wp = _inf_groups addWaypoint [getmarkerpos "m6", 0];
_wp setWaypointType         "MOVE";
_wp setWaypointSpeed         "NORMAL";
_wp setWaypointBehaviour     "COMBAT";
_wp setWaypointFormation     "LINE";

 

I can figure out more or less what each line means, but I´m not sure about the pieces I set in bold above.

1- I do not know what "kamyon_1" means.

2- "foreach crew truck1;" I take to mean that the vehicle crew will be made exempt from the "GetOut" action?

 

 

If I have understood everything other than that properly, what this script does is replace the markers I make in the editor with something that will have the same functionality as waypoints, more or less?

 

 

As for the get in/get out loop, that might because of the VCOM AI. I have turned it off, I´ll see if that fixes it.

 

And yes, I also like Zeus´s awesome functions. I was very much into roleplaying before even knowing Arma existed, so the idea of being a game master (but in a milsim game, in this case) appeals to me. But I suppose the clan leaders had bad experiences with that from being in other clans and decided not to use it. I think that is a bit of an overreaction, particularly when so many problems with mission building can be solved with simply spawning units during the mission and giving them orders instead of having to faff about with timers and triggers.

Share this post


Link to post
Share on other sites

This is a very cool idea but the WORST thing one could do in an ambush is stop in the kill zone. The enemy will fix you, with machine guns, complimentary indirect fires and wipe you out. Best if those AI just pushed through the ambush ;p 

https://www.military1.com/training/article/1633852014-how-do-troops-react-to-an-ambush-when-they-cant-see-the-enemy/

 

https://www.tactical-life.com/firearms/under-fire-caught-in-an-ambush/

 

But I loved that the AI moved around the battle space dynamically. Seriously good scripting work man .... 

Share this post


Link to post
Share on other sites

Hi @Devastator_cm, quick question..

 

I'm forming up my convoy dynamically and choosing the destination in the same way. How does your script cope if I only give it the destination and no intermediate points?

Share this post


Link to post
Share on other sites

then you will relly on the BI pathfinding :)

single wp is ok but then the road will be picked by the arma 3 engine and not based on your own wishes

Share this post


Link to post
Share on other sites
1 hour ago, Devastator_cm said:

then you will relly on the BI pathfinding :)

single wp is ok but then the road will be picked by the arma 3 engine and not based on your own wishes

Yes, that's what I thought you'd say.

My problem is that in an entirely dynamic system, I'm reliant on the ai to get from dynamically chosen A to dynamically chosen B. Getting a mid point in code might be possible, but it might just make things worse.

only one way to find out! :)

Share this post


Link to post
Share on other sites

then you can cross the fingers and trust Arma engine to find a good route for the trip :)

Share this post


Link to post
Share on other sites

Another stupid question :) Does the order of the vehicles matter? In the parameters that we pass to the script, does the first one have to be the lead vehicle?

Share this post


Link to post
Share on other sites

Damn it Arma! lol. Probably outside your remit, but posting it anyway. :)

 

9cd5f8fda6.jpg

Share this post


Link to post
Share on other sites

Yes, they are. I'm thinking of spawning a script on each vehicle that does something like; if the vehicle is stationary for 30 secs and is on a bridge ((floor getpos _vec) select 2) != ((floor (getposATL _vec) select 2), then give the vehicle a nudge with _vec setvelocitymodelspace [0,30,0].

 

But I'm also getting convoys halting for no real reason. Here, for example, the convoy destination is Regina, a couple of clicks to the south, and they'd already driven from Petit Nicolet, 3 K to the north, but for no obvious reason, they stopped here. I took that screenie some 30 mins ago and as I write, they are still there. What's odd is that the vehicles all have their engines off.

ad4b427b4e.jpg

Share this post


Link to post
Share on other sites

They were only given one waypoint and that was in the middle of Regina 2.9km away. Debug confirms this. I'll look into using your convoyend.sqf to see what's happened.

 

** edit.. that said, the waypoints array of the group of the driver of the lead vehicle is empty. What's going on here?

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

×