Jump to content
Sign in to follow this  
exigent

Perfect Convoy and more...

Recommended Posts

I remeber seeing a script about "perfect convoys", i always see it in missions. A convoy is perfectly in a row and is following the roads path, so:

1. How do i have all the vehicles in a group line up perfectly and drive on the roads path?

Also i am making a mission, and i have a 2 hummers. One of the hummers is empty with only a gunner and a driver (it is in the front), then i have one thats full with cargo, gunner and driver (it's in the back). The one that is full has the leader inside. I have a move waypoint, but the hummer in front without the leader inside always makes a u-turn and then follows, so:

1. How do i have the two hummers moving perfectly and following the road but with the leader behind in the 2nd hummer?

I want the 1st hummer for security because it is gonna explode and i don't want the leader to die.

Thank you in advance. smile_o.gif

***EDIT***

- I just discovered another problem:

The 2 hummers are from Empty>CBT Cars, and i have a Soldiers from the HYK destery infantry 03 as drivers and gunners for the two hummers. I am an AT4 soldier in the cargo for the second hummer, and the leader tells em to move they don't move?! Same with the other unit behind me in a 5T truck? Any help?

Share this post


Link to post
Share on other sites

I don't use a script to make the convoys line up perfectly. See I have a mission right now with 5 humvees and 2 lavs and I use a waypoint leading to where you want to go, change fomation into cloums making them go into straight line and it would also help if you put none in the units box the selection of none, formation, cargo, flying that one put none on all of them and put them in that line and use that waypoint. Hope that helps if needing better explanination reply back asking what.

2. Woodland hummer pack if you can find out the name of the pbo I can pull it out of my large addon files. I have lots of addons and at least 4 hummer packs so I don't know which one it is. band.gif

Share this post


Link to post
Share on other sites

On my mission highway to hell I have the convoy driving in careless mode. In safe and careless the vehicles will stay in a column and follow the roads. Problem with safe is that the moment they are attacked they'll swith to alert and go into combat formation and ignore the road. Problem with careless is that they will not return fire or do anything.

How I got around this little issue on my mission was to make the drivers of the convoy their own squad and put them in careless. This way they would stick to the road and in a column no matter what. To make sure they would fire back though I just put the gunners as a seperate squad in danger mode and moveingunnered them into the gun posistions on the convoy. So in this way the convoy would stick to the road and not break off of it, yet the gunners would still engage targets and fight.

On other thing to keep in mind about convoys in the game. They always line up in order of highest rank from front to back. So if you have three vehicles and the three drivers are ranked,private, corpral, and sargeant; the sarge will be the lead vehicle the corpral behind him and the private will bring up the rear.

Share this post


Link to post
Share on other sites

Aright sweet thanks a lot for the help. I set the waypoints to SAFE and Column. I the driver in the first hummer as the a Captain. So now finally i got my convoy to move! But more problems lol:

1. The first hummer doesn't go all the way to the objective, it stops back i think like 150 meters and tells everyone to disembark, the second on actually goes where it is supposed to go and same with the truck. How do i get the 1st humvee to move where is supposed to move (this is the one with the leader)?

2. The leader tells everyone to disembark, how do i have the 2 gunners not disembark but keep firing? Currently i have a "Getout" waypoint.

3. When the enemy is attacking us, all the U.S. guys run to the enemy and attack, i want them to stay at the objective and, spread out and engage, not run to them and engage. How can i do this?

Share this post


Link to post
Share on other sites

One way to get a perfect convoy at mission start is to place empty vehicles in the order you wish and the (crew-)group on foot.

Then write a script with movein commands in perfect order.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

(units groupX select 0) moveindriver 1stvehicle

(units groupX select 1) moveindriver 2ndvehicle

.

.

(units groupX select 4) moveingunner 1stvehicle

(units groupX select 5) moveingunner 2ndvehicle

.

.

(units groupX select 8) moveincargo 1st vehicle

.

.

.

groupX setformation "column"

groupX setbehaviour "careless"

This way "1" always becomes driver of the leading vehicle and all the other vehicles follow as placed in the editor.

I think it is neccessary for the groupleader to be commander/driver of the leading vehicle if you want a perfect convoy.

Also a big ai convoy drives better if the crewcargo (supernumerary crew-group members) are in the first vehicles not the last ones.

@2. Maybe it is a lot easier for your mission if you just make two groups. One group "infantry" and a group "drivers/gunners" or only "gunners".

"drivers/gunners" allows you to use an "unload cargo" waypoint.

"gunners" becomes more complicated, as waypoints without scriptcommands wont work, I think.

@3. "Engage At Will" firemode is mostly the reason for ai squads to go mad instead to keep formation if enemys are around.

Share this post


Link to post
Share on other sites

Lol what? That script stuff is so confusing tounge2.gif . I'm only good at copying and pasting stuff in the inti. like lol.

1. How about i put something in the inti. line in the waypoint that tells everyone to get out expect for the gunners?

2. One of the hummers goes right up to the enemy then gets blown up by an RPG! I'm getting so mad!!!! How can i prevent this?

So far i have the convoy moving, but the mission is for the convoy to hold a town against enemy forces. But before they get there they start enganging? They disembark because they are getting engaged.

3. I want them to move to the town and then start engaging. How can i do this?

Share this post


Link to post
Share on other sites

Someday you will script something. Its just like a big init line inside a file named .sqs, that you start with "[] exec myscript.sqs" when ever you need it. wink_o.gif

@1.

That's possible:

Give every soldier a name, then add commands to the right waypoint init.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">soldiername unassignvehicle

@2. & 3.

Only in careless mode they will drive directly to the village. As already mentioned above they won't return fire while careless.

Place the careless waypoint in the village, then an aware or combat waypoint close to it.

The unassign commands belong to one of the waypoint inits, but I'm not sure to which. You'll have to try it. smile_o.gif

You don't even have to change the firemodes at the waypoints. They don't fire in careless and start fighting if set to aware with the default firemode.

Share this post


Link to post
Share on other sites

I did what you said (but not the unassiagn thing in the waypoint), good thing is they all get out expect for the gunner. But the bad thing is that the driver stays to and they go right up to the enemy?

I was thinking maybe have a script in the waypoint for everyone to get out then have one for the gunner to stay in, instead of having a million "unassaign"? But how do i do this?

This way the driver won't drive to the enemy, but instead fire.

Also eventhough the waypoint is set to careless, the first hummer with the 50.cal fires when they approach the village, weird but good cause they actually go the waypoint biggrin_o.gif .

Share this post


Link to post
Share on other sites

Sounds like an unload cargo waypoint. Normally it is used for an OnlyCrewGroup to disembark the OnlyInCargoGroup of a vehicle.

Combine the following command with a default (move?) waypoint.

You can also write this short line in the init but I will tell you how to make a little script. smile_o.gif

Create a file in the mission folder and name it arrival.sqs

Open it with something like notepad and write:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{if (!(_x == gunner hummername1) && !(_x == gunner hummername2)) then {unassignvehicle _x}} foreach units YourGroupnameHere

exit

Save it.

In the waypoint init write:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "arrival.sqs"

...to call the script

Ofp mission editing is full of surprises, no one should be firing... And you're sure that drivers/gunners/cargo were all in the same group?

Share this post


Link to post
Share on other sites

1. That script, do i change the "gunner" name to my gunners name in the editor?

2. Do i change "hummername1" and "hummername2" to the names of the hummers in my editor?

3. Do i put anything in the []?

4. Right now the file i have is a txt. file, how can i change it to a sqs file?

5. Yes i am sure they're all in the same group.

Thank you for your help so much!!! It's amazing how you created a script, is there a place where i can learn this kinda stuff? yay.gif

Share this post


Link to post
Share on other sites

1. no don't change it. its a command to find out whos gunner of a vehicle

2. yes

3. no, not for this script

4. First you have to setup your windows to display file extensions like .txt

I can't tell you exactly where, as my windows is in german. It's something in the file options.

If you can see the .txt your able to change the .txt while simple renaming.

If you don't find it, try to call arrival.txt in init. I'm not sure but I've read somewhere ofp doesn't really care about it.

You will find all commands in the official command reference.

This file, many tutorials and example scripts you can find at Operation Flashpoint Editing Center -> Editors Depot

Share this post


Link to post
Share on other sites

1. Where it says "YourGroupNameHere", what do i put there? How do i figure out my groups name?

2. Do i put [] exec "arrival.sqs" in the in Activiation line or in the Scripted line?

Share this post


Link to post
Share on other sites

1. You have to name it yourself. In the init of one of the groupmembers write:

YourGroupNameHere = group this

2. Put in in the onActivation line of a waypoint. The more I think about it, the one after the careless wp should be the right one. It should be the 'activated' one after the group has arrived careless in the village.

Share this post


Link to post
Share on other sites

It keeps saying:

Script arrival.sqs not found

I have the file in my missions folder name arrival.sqs as a SQS file.

Share this post


Link to post
Share on other sites

As you were unsure about turning .txt into .sqs, I guess the real filename is arrival.sqs.txt but your windows is still configured to hide the real extensions (in this case .txt).

There are special tools for ofp editing that allow you to save scripts as .sqs file without such difficulties.

http://www.ofpec.com/editors/browse.php?browsewhat=3&category=3_1

I'm using Chris' OFP Script Editor.

Share this post


Link to post
Share on other sites

I just downloaded a script and opened it up in  notepad, deleting everything, put your script and renamed it tounge2.gif .

This program is confusing lol, what do i do with it? crazy_o.gif

Share this post


Link to post
Share on other sites

Is the script working now?

This was the only reason i mentioned that tool. wink_o.gif

It is more comfortable for scripting than the notepad.

In example it displays more important "words" in different colors.

Ofp commands in red ect.

Also It inlcudes generators for overview, briefing, weaponloadouts.

Share this post


Link to post
Share on other sites

nope it still isn't, here it is:

{if (!(_x == gunner humvee1) && !(_x == gunner humvee2)) then {unassignvehicle _x}} foreach units red

exit

1. humvee1/humvee2 = name of the first hummer (it is a empty hummer and i put troops in it by using the "movein..." commands).

2. red = name of my group, i put this in the inti. line of my team leader:

red = groupthis

Those are the only thing i changed in the script.

Also it says it can't find the script when i actually go to the waypoint.

I have two waypoints for only the 2 hummers, a carless one then a move waypoint right beside it.

After it says script cannot be found, i press enter. Than no one even gets out of the vehicle, they just stay in that spot, good thing is the hummer doesn't move, the gunner keeps shooting.

When i use a different waypoint like "Guard", it works fine but the 2 hummers still go up to the enemy. mad_o.gif

Questions:

1. The team leader says engage at will, is there a way of preventing him from saying this?

P.S. - If it makes a difference, the first hummers driver is the team leader.

2. Soldiers from both groups walk right up to the enemy, how can i also prevent this?

If you want i can upload my missions folder (18kb) and send it to you through a P.M.?

Share this post


Link to post
Share on other sites

after looking at your files:

the script syntax is ok.

red = groupthis will cause a problem if the script is found.

correct is:

red = group this

As you saw on the screenshot I sent, script is not found because its named arrival.sqs.sqs and you call arrival.sqs in the mission.

Noone disembarks because if a script isn't found it's not executed.

Keep the move waypoints. You've seen what the guard waypoint does to the ai in this situation. smile_o.gif

1. In the waypoint options just above the speed setting, are the options for engage at wil. Try something like CombatMode "Open Fire", not "Open Fire. Engage At Will". (I'm just guessing how it's called in english ofp.).

Best thing is not to change the default setting, from first to last waypoint, if you just want them to fight in formation.

PS: I've just read combatMode="RED" at the second wp in your mission.sqm, thats the reason for the leaders order.

2. Using only a move wp and getting rid of engage at will (1.) should stop that.

I hope you're speaking of "both" groups just because its still one group disembarking two vehicles? wow_o.gif

PS: Just looked at the wps of the group inside a truck. If they are also at the ambushsite I would recommend to disembark them and using a "hold (postion)" wp.

Guard wp are ment to be used in conjunction with another type of wp:

Some ai groups work as spotter and will call in the other groups as reinforcements if they thinks its a good idea. (type/numbers/distance play a role)

I don't know if theres a wp-type list somewhere online. I've got mine with the german Red Hammer manual.

Share this post


Link to post
Share on other sites

Same thing? The humvee's drive right up to the enemy?

Share this post


Link to post
Share on other sites

I've mailed you a working example mission. I'm sure you will find out what is different.

You're right ai fires also in careless mode at attacking enemys!

It's like: Drive on to the WP, but return fire if attacked and you have the chance to.

I didn't know it before, because i've only used this mode together with hold fire or with unarmed units.

I've used m113s. Jeeps were to week to survive any ambush.

Enemy has one RPG. It's supposed to miss, but sometimes it hits.

If you delete the last waypoint you will see that your group cycles a bit around the m113 but doesn't really run towards the enemy.

The last WP is an example for a simple "defensive position" WP.

There will be times they even run without "engage at will" towards the enemy. It's the village. If the leader orders "5 attack man" and 5 belives it won't hit through the buildings it runs towards the enemy until it has a line of sight.

And the ai has other eyes than the playing human.

The arrival script is working. All the others things around are just my idea of recreating your ambush scenario.

You will have a hard time with the ai doing exactly what you want in this kind of scenario.

Ai has already pathfinding problems in villages without a firefight.

If possible, let the ai decide everything for itself:

Let them disembark with arrival.sqs, then use a "hold position" wp for the village center, or a "search&destroy" wp near the enemy positions. Just decide for them if they are more defensiv or agressiv.

The truth is, it's almost impossible to design an OFP mission so special like a Call of Duty mission for example. confused_o.gif

Share this post


Link to post
Share on other sites

Sweet, will do. Thanks so much for all the help yay.gif .

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  

×