Jump to content
norrin

norrin's ArmA2 scripts ported to ArmA3

Recommended Posts

Following up on my earlier post, I've fixed the issues with the convoy restarting (except for if there's not enough transport; I still need to look at that):

First, we need to stop ejecting units that the script exempted in convoyMove.

convoyRestart.sqf, replace line 20 with the following:

{
_tmpVcl = vehicle _x;
if( (driver _tmpVcl) != _x && (gunner _tmpVcl) != _x && (commander _tmpVcl) != _x ) then {
	unAssignVehicle _x;
	[_x] allowGetIn false;
	doStop _x;
};
}forEach _units;

Next, we need to make sure that convoyMaxSpeed does not get stuck in an infinite while loop:

convoyMaxSpeed.sqf, change line 25 to exit it's movement loop

while {alive _vcl && !(_vcl getVariable "NORRN_convoyDestination") && _vcl distance _vcl2 > 60} do {

convoyMaxSpeed.sqf, change line 38 for the same reason

while {alive _vcl && !(_vcl getVariable "NORRN_convoyDestination") && _vcl distance _vcl3 < 40} do {	

I also commented out lines 19 and 20 in convoyMaxSpeed.sqf because the loop in convoyMove already takes care of those checks. I'm not sure that you have to (leaving them in _might_ make them react to ambush more quickly).

Without these changes, when a convoy unit was killed and the convoy restarts, there would be at least two scripts fighting to set the velocity to potentially two separate destinations. This is obviously bad. ;) Additionally a dead unit might never exit the while loop since it could never reach its destination.

The changes to lines 25 & 38 check that the vehicle is alive and also that some other portion of the script hasn't told it to exit (Norrin uses that NORRN_convoyDestination flag generically, it does not mean it reached the end just that the convoy has been told to stop).

I'll submit these changes to Norrin and look at the other potential infinite loop problem in convoyRestart later - still, for anyone using the convoy scripts, this should let you get them behaving as expected.

EDIT

Another bug now that they restart, turns out the marker list being passed to the restart didn't actually have the already-passed markers removed.

Replace convoyMove.sqf, line 32 with:

_markersRemaining = _markersRemaining - [_marker];

Edited by cameroon
Additional bugfix.
  • Like 1

Share this post


Link to post
Share on other sites
;2609266']Make sure in description.ext that respawn = "BASE"' date=' and that the characters that should be respawning are named correctly.[/quote']

yeah already triple checked everthing i could think of... even redid the mission several times and set the markers accordingly but it seems that the script breaks after some time (revive in base is possible later in the mission outside of the base its not possible). probably will quit trying but nonetheless thanks for your help

Share this post


Link to post
Share on other sites

I hope I hear back from Norrin, I've been working on a variety of tweaks and updates for my own missions. Convoy's behave much better going through urban areas and should generally cause less of a performance penalty, particularly if something causes an obstruction in confined space like city streets and I think I've gotten rid of all the potential infinite loops that could keep the convoy stuck (like if a driver can't get back in due to pathing problems).

I've also been adding some fun things, like evac:

Share this post


Link to post
Share on other sites

Hi,

does anybody know why this script is making me and some of my fireteam(ai) INVINCIBLE sometimes? and usually when that happens my ability to revive others does not work,i dont even get option for it.

Has this happened to anybody?Its extremely common by the way tested it multiple times

Thanks for any help

Share this post


Link to post
Share on other sites
Hi,

does anybody know why this script is making me and some of my fireteam(ai) INVINCIBLE sometimes? and usually when that happens my ability to revive others does not work,i dont even get option for it.

Has this happened to anybody?Its extremely common by the way tested it multiple times

Thanks for any help

I can assure you it is not extremely common because it doesn't occur in the sample mission and I believe you are the first one mentioning it. However, are you running anything else that perhaps is conflicting with the script, like the posters in the last page?

Share this post


Link to post
Share on other sites

It wasnt common at first just lately.

And yes,just read the post....i am running bcombat,and alive as the other guy was...oh dear. should i assume i have a winner their? modding and scripting is not my thing.

Share this post


Link to post
Share on other sites
It wasnt common at first just lately.

And yes,just read the post....i am running bcombat,and alive as the other guy was...oh dear. should i assume i have a winner their? modding and scripting is not my thing.

Given past results, I can gaurantee you that Alive is causing the conflict.

Perhaps if I get a chance in the next few days I will make a sample mission which implements Norrin's revive with the Alive scripts, whatever it is. Seems to be popular.

Share this post


Link to post
Share on other sites

That would be awesome,iv had troubles with the alive mod lately too.im think now these two dont play well.

And by the way,ALIVE is probably one of the best mods iv seen to date,its hard to explain it but you need to check it out.All il say is that it actually brings the battlefield to life in a huge war zone with no FPS loss as it profiles all units kind of cacheing them.

Just check it out well worth it.

Share this post


Link to post
Share on other sites
That would be awesome,iv had troubles with the alive mod lately too.im think now these two dont play well.

And by the way,ALIVE is probably one of the best mods iv seen to date,its hard to explain it but you need to check it out.All il say is that it actually brings the battlefield to life in a huge war zone with no FPS loss as it profiles all units kind of cacheing them.

Just check it out well worth it.

Well i disabled ALL of my mods including ALIVE and this scripts still bugging out on me.It seems that as soon as my fireteam enter a heli or other vehicle and get out,they are invincible and dont revive me,sometimes i am invincible too.

No other scripts running either.testing the last 3hours with different factions too.

Share this post


Link to post
Share on other sites
;2612682']Given past results' date=' I can gaurantee you that Alive is causing the conflict.

Perhaps if I get a chance in the next few days I will make a sample mission which implements Norrin's revive with the Alive scripts, whatever it is. Seems to be popular.[/quote']

Well that would be much appreciated :D

Share this post


Link to post
Share on other sites
Following up on my earlier post, I've fixed the issues with the convoy restarting (except for if there's not enough transport; I still need to look at that):

First, we need to stop ejecting units that the script exempted in convoyMove.

convoyRestart.sqf, replace line 20 with the following:

{
_tmpVcl = vehicle _x;
if( (driver _tmpVcl) != _x && (gunner _tmpVcl) != _x && (commander _tmpVcl) != _x ) then {
	unAssignVehicle _x;
	[_x] allowGetIn false;
	doStop _x;
};
}forEach _units;

Next, we need to make sure that convoyMaxSpeed does not get stuck in an infinite while loop:

convoyMaxSpeed.sqf, change line 25 to exit it's movement loop

while {alive _vcl && !(_vcl getVariable "NORRN_convoyDestination") && _vcl distance _vcl2 > 60} do {

convoyMaxSpeed.sqf, change line 38 for the same reason

while {alive _vcl && !(_vcl getVariable "NORRN_convoyDestination") && _vcl distance _vcl3 < 40} do {	

I also commented out lines 19 and 20 in convoyMaxSpeed.sqf because the loop in convoyMove already takes care of those checks. I'm not sure that you have to (leaving them in _might_ make them react to ambush more quickly).

Without these changes, when a convoy unit was killed and the convoy restarts, there would be at least two scripts fighting to set the velocity to potentially two separate destinations. This is obviously bad. ;) Additionally a dead unit might never exit the while loop since it could never reach its destination.

The changes to lines 25 & 38 check that the vehicle is alive and also that some other portion of the script hasn't told it to exit (Norrin uses that NORRN_convoyDestination flag generically, it does not mean it reached the end just that the convoy has been told to stop).

I'll submit these changes to Norrin and look at the other potential infinite loop problem in convoyRestart later - still, for anyone using the convoy scripts, this should let you get them behaving as expected.

EDIT

Another bug now that they restart, turns out the marker list being passed to the restart didn't actually have the already-passed markers removed.

Replace convoyMove.sqf, line 32 with:

_markersRemaining = _markersRemaining - [_marker];

Thanks mate!!! Using this script successfully now.

Share this post


Link to post
Share on other sites
Thanks mate!!! Using this script successfully now.

Awesome, I'm glad they're working for you!

Share this post


Link to post
Share on other sites

I got a question..maybe Im just blind or missunderstanding something.

I want to limit the numbers of Respawns to 1 if the whole group is down. But I want infinite (or at least a high number) of revives.

As what I understand it the number of lives = both...respawns AND revives.

Please give me an advice...I feel real stupid right now :D

Share this post


Link to post
Share on other sites

Is there anyway to hold and continue the convoy? I tried calling the script via trigger using new WP´s, but the convoy does nothing.

Share this post


Link to post
Share on other sites

Hey Norrin, I'm having some strange behavior with the convoy script. With six wheeled vehicles traveling a long distance, the rear vehicles tend to drive a little faster and they'll eventually attempt to pass the other vehicles, almost like they are trying to reform the formation. Do you have any ideas?

I figured out the problem. It was related to another script I was using.

This convoy script is excellent. Thank you Norrin.

Edited by Lucidity

Share this post


Link to post
Share on other sites
Hi Norrin

Any updates for the Taxi script - not working at the moment.

Regards

Lighty

Indeed! Never used this taxi script but, seems just what we're missing tbh :)

  • Like 1

Share this post


Link to post
Share on other sites

You have to change the class name of the helicopters for it to work. On a side note how do I maintain the dialog option after respawn?

Share this post


Link to post
Share on other sites

@Norris

Thanks for all your hard work. You have really done an outstanding job. Just a quick question regarding the max speed in the convoy script. How can I adjust it? I suspect if I change the max speed I need to change the max distance as well. Can you just maybe point me in the right direction? I suppose it is somewhere in the convoyMaxSpeed.sqf but I only have basic scripting knowledge and most of it is a bit above my head. Thanks once again man.

Share this post


Link to post
Share on other sites

I have managed to get it up and running okay, but the chopper just flies in circles when I get in and tell it to do anything. Anyone got a fix for this??

Share this post


Link to post
Share on other sites

Hey Norrin,

Awesome script, works real well in SP! I am having an issue with removing the script, however. I've since moved onto making another mission to learn more about scripting and editing. For some reason, everything Aerial Taxi is merged over to my other mission that does not include the Aerial Taxi scripts. When I place a chopper that happens to be the same chopper (ghost hawk) I used in the Aerial taxi mission, I still have the addaction commands (IE, set position in map). I have done a lot of digging but I cannot find out why it all gets merged without me merging anything. I even went as far as removing the script from the mission that used aerial taxi (so aerial taxi does not exist on my machine in anyway) and it continues to think I still want to use it.

Any help is really appreciated. From anyone

Thanks for your time!

Keep up the great work

Doh! Not even your script that has beef. It was RAV Lifter! My mistake, as you were!

Edited by Rallii

Share this post


Link to post
Share on other sites

Just wondering, does anyone know of a way to make the convoy follower in a "tighter" formation?

Share this post


Link to post
Share on other sites

I'm probably missing something very basic here, but when I try to call the script with 7 vehicles in the array...

[["pos1","pos2","pos3","pos4","pos5"],[c1,c2,c3,c4,c5,c6,c7],true] execVM "convoyDefend\convoyDefend_init.sqf";

... I get all kinds of "Undefined variable" errors. Any ideas?

Share this post


Link to post
Share on other sites

heya guys,

i am having some troubles trying to implement this script into one of my missions, the idea was to have the convoy towards a town where the players are securing a VIP .. the composition of this convoy i was planning was going to be the following vehicles (all modded vehicles)

  1. Land Rover HMG
  2. Warrior
  3. Truck
  4. Truck
  5. Truck
  6. Warrior
  7. Land Rover HMG

now the problem i am having here is that all the vehicles speeds are different so they will just start overtaking one another and thus basicly screw up the convoy.

now i was also trying to set a secondairy convoy wich would move and provide cover angles while the first convoy moves through, this i was planning with having a trigger at a designated spot and then once the last vehicle moves through have the secondairy convoy move to their next spot, now this is working on the first marker but as soon as they are there and the last vehicle triggers the 2nd convoys move the secondairy convoy will just keep going in circles on the spot and not go towards their next marker..

any1 got an idea how i can fix these 2 issues ??

Share this post


Link to post
Share on other sites

Is there a way to make the convoy travel faster than it does? I love the script but it is sometimes way too slow. Someone please help!!

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

×