Jump to content

Recommended Posts

use following in init.sqf

 

if (isServer) then 
{
    [] execVM "Convoy\ConvoyInit.sqf";


};

is your trigger condition correct? You didn't show it

Share this post


Link to post
Share on other sites

I was calling it, blufor present, condition:this, with the syntax onactivation. Trigger covers the area where the players spawn in at.

 

But I'm running it from the init.sqf now, just for the hell of it

 

if (isServer) then  
{ 
 _handle = [["pos_1","pos_2","pos_3","pos_4","pos_5","pos_6","pos_7","pos_8","pos_9","pos_10","pos_11","pos_12","pos_13","pos_14"],[c1,c2,c3,c4,c5,c6,c7,c8,c9], 25, 500, 120, 1, "NORMAL", "CARELESS"] spawn DEVAS_ConvoyMove;  
};

 

I get an error, undefined variable in expression Devas_convoymove;

I added 

if (isServer) then 
{
    [] execVM "Convoy\ConvoyInit.sqf";


};

to the init.sqf, just above.

It's not working... for some reason it doesn't seem to be initializing. 

Thanks.

Share this post


Link to post
Share on other sites

can you send me your init.sqf? Maybe even your mission.sqm (I hope you don't have mods which I don't have) so I can check.

 

Share this post


Link to post
Share on other sites

just for info to others, issue was old version of script used with the latest call parameters.
Another important point is to use a sleep if convoy will be started from init.sqf
 

 [] execVM "Convoy\ConvoyInit.sqf"; 
sleep 2;
_handle = [["pos_1","pos_2","pos_3","pos_4","pos_5","pos_6","pos_7","pos_8","pos_9","pos_10","pos_11","pos_12","pos_13","pos_14"],[c1,c2,c3,c4,c5,c6,c7,c8,c9], 25, 500, 120, 1, "NORMAL", "CARELESS"] spawn DEVAS_ConvoyMove;  

Share this post


Link to post
Share on other sites

Just wanted to share this, in case someone else runs into the same issue I had. I couldn't run this script on the dedicated server because the headless client was essentially taking over and it caused a conflict.  Our clan uses acex headless client, so it might be slightly different depending on which headless method you're using. Anyhow, maybe it's just us and how everything is configured, but just in case, this was the work around:

 

["php"]

If (isServer) then 
{
    [] execVM "Convoy\ConvoyInit.sqf";
    {
      _x setVariable ["acex_headless_blacklist", true, true];
    } forEach [c1, c2, c3, c4, c5,c6,c7,c8,c9];
    
};

 


 

 

[/"php"]

You blacklist the vehicles running on the convoy script, from running on the headless. Run that code from the init.sqf and enter the variable names of the vehicles you want to blacklist: c1, c2, etc. 

Share this post


Link to post
Share on other sites

Version 2.5 released!

Major improvements are 

- Attack position selection for vehicles based on vehicle's type and enemy. It also considers the distance to enemies and the amount of enemies in a specific area when it picks attack position. For example a Humvee will try to come closer to a infantry group instead of a single unit. A tank will prefer to come closer to enemy tanks instead of infantries

- Adjusted restart speed (parameter for restart duration is removed)

- Airvehicles are not considered as enemy. Most of the time I noticed that convoy is stopping due to them but nobody from convoy can make a proper attack which causes convoy to be destroyed easily. Now convoy tries moving futher to its final destination

- During restart phase, convoy is still able to defend itself properly. Before it was not working.

 

 

I add a video to demonstrate what this script is offering.

Enjoy!

  • Like 3

Share this post


Link to post
Share on other sites

Wow, that script has become a beast. :respekt:

Thanks, Devastator, great job!

Share this post


Link to post
Share on other sites

One question after having watched the video. Does the infantry without vehicle (after an ambush) walk to the final marker or will they eventually start running to it? The latter would be good IMO as it's not a walk in the park. :D

 

Keep it up, mate!

Share this post


Link to post
Share on other sites

just some info regarding walkers :)
Without vehicle infantry case happens based on following

- no seat avaiable

- somehow AI got stuck and couldn't get into a vehicle. There is a timer to prevent stuck convoys. When timer is out such infantry are treated as no seat available

 

They are walking to final destination and not running because with such load on you, you cannot run in real life that long :)

Share this post


Link to post
Share on other sites
8 hours ago, Devastator_cm said:

They are walking to final destination and not running because with such load on you, you cannot run in real life that long :)

 

Well, it depends, but that's already a sufficient explanation for me. :D Thanks.

Share this post


Link to post
Share on other sites

I was having issues at first with undefined variables until I used the " sleep 2; " you suggested. Now it works!  This is a great script and it came out just in time!  Using it in the current mission I'm making.

 

88Mike

Share this post


Link to post
Share on other sites

The addon looks good, by the video presentation. But I make a suggestion. In the video, it is seen as the convoy being attacked, it stops right there. This is a tactical mistake, you should not stop where you are attacked, but you must leave the death zone immediately. Think about it, why stop where the enemies have just attacked you? In these situations, you continue with speed, and when you reach a position advantageous for you, it is when you stop and organize the counterattack. Otherwise, stopping there will cause many casualties in your unit.

 

Therefore, if you could program the AI so that the stop did not do it in the same place, would be, militarily speaking, more correct.

 

This is my suggestion :rthumb:

Share this post


Link to post
Share on other sites
4 hours ago, legolasindar said:

The addon looks good, by the video presentation. But I make a suggestion. In the video, it is seen as the convoy being attacked, it stops right there. This is a tactical mistake, you should not stop where you are attacked, but you must leave the death zone immediately. Think about it, why stop where the enemies have just attacked you? In these situations, you continue with speed, and when you reach a position advantageous for you, it is when you stop and organize the counterattack. Otherwise, stopping there will cause many casualties in your unit.

 

Therefore, if you could program the AI so that the stop did not do it in the same place, would be, militarily speaking, more correct.

 

This is my suggestion :rthumb:

 

Can you give an idea how you define position of advantegeous for convoy in Arma? Then I might think to implement it :)

  • Like 1

Share this post


Link to post
Share on other sites

Nice script !!

 

Shall I suggest a sleep 1 or 1.5 in the ConvoyMove.sqf after [_unit] allowGetIn false; (line 148) ?

This way all troops are not insta-popping from a vehicle.

Share this post


Link to post
Share on other sites
2 hours ago, 1212PDMCDMPPM said:

Nice script !!

 

Shall I suggest a sleep 1 or 1.5 in the ConvoyMove.sqf after [_unit] allowGetIn false; (line 148) ?

This way all troops are not insta-popping from a vehicle.

 

Good one I will add to my to do list

Share this post


Link to post
Share on other sites

Thx !!! :)

 

I forgot to mention I tested multiple times the demo mission. One time, the crew of the first vehicle was totally killed (the HMMV or something like that). The driver of the second vehicle was also killed. Once bluefor won, a driver for the second vehicule was assigned but they completly forgot the first one (and the only armed one) ;) 

Share this post


Link to post
Share on other sites
11 minutes ago, 1212PDMCDMPPM said:

Thx !!! :)

 

I forgot to mention I tested multiple times the demo mission. One time, the crew of the first vehicle was totally killed (the HMMV or something like that). The driver of the second vehicle was also killed. Once bluefor won, a driver for the second vehicule was assigned but they completly forgot the first one (and the only armed one) ;) 

 

how was the condition of the vehicle? If badly damaged they ignore it

Share this post


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

 

how was the condition of the vehicle? If badly damaged they ignore it

 

it looked ok but may be I didn't notice some engine damage or something like that. I'll do more tests and tell you if I find anything weird.

Share this post


Link to post
Share on other sites

Hi There, is there anyway you would be able to look at the "Taxi" part of NORM's script? or create a new script for Heli drop off and evac? thanks for all the hard work and sharing 

Share this post


Link to post
Share on other sites

Hi,

This is a great script. I have done a few convoy missions (since OFP was initially released in 2001) and always had the AI being stupid as everyone knows.

I have installed this script and the results are great.

 

I was wondering if it was possible to do the following:

1) stop and start the convoy (eg via a trigger)? This would be great for when a convoy reaches a town and needs to wait until something happens before proceeding.

2) set the spacing between the vehicles (for some of my missions it is too large).

 

Also, just thinking about modifying this script. Would be possible to have a lead vehicle that used normal waypoints and then use a modified version of this script to get the other vehicles to follow the lead vehicle. this would:

a) allow you to use standard waypoints instead of having to create specific convoy markers;

b) allow you to synchronize the convoys movement using triggers (and other waypoints) like normal units/vehicles.

 

There would be issues that would have to be addressed, for example:

A)You would have to have to stop convoy whenever lead vehicle changed behaviour (ie from default).

B) How to handle case when lead vehicle is destroyed.

 

But if implemented it would provide a more standard (and useful) approach to convoys.

Anyway, I thought I might mention this concept as it may be possible to achieve this without to much modification.

 

Thanks for all the work that has gone into this script already. It is great!

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

×