Jump to content
Sign in to follow this  
nighteyes13

How to order a Squad to Get in multiple vehicles several times.

Recommended Posts

Hi all,

I've been trying to get the following situation to work

Heli Mohawk helicopter

Solider Squad made up of 6 riflemen; [s1, S2, S3, S4, S5, S6] (player is S1 in this squad)

Transport Squad made up of 3 Hunter HMG [ T1, T2, T3]

Goal

  1. Solider Squad Starts in Heli as Cargo
  2. Heli Flys Solider Squad into FOB and Unloads them
  3. Solider Squad Moves to Transport Squad
  4. Solider Squad Gets In Vehicles in Transport Squad
  5. Transport Squad Moves to Location
  6. Solider Squad Gets Out
  7. Soliders continue to mount and dismount from the transport during the patrol

I trying to get this to work I came across a number of threads discussing this however nothing I have tired works constantly.

Heres what Ive got

Part 1:

Heli Transport to base created using move waypoints then a transport unload waypoint synced the Soilders squads getOut waypoint:

Heli Init = S1 MoveInCargo [Heli, 15]; S2 MoveInCargo Heli; S3 MoveInCargo Heli; S4 MoveInCargo Heli; S5 MoveInCargo Heli; S6 MoveInCargo Heli;  

Solider Squad getout waypoint has the following in the OnAct

unassignVehicle  S1; unassignVehicle  S2; unassignVehicle  S3; unassignVehicle  S4; unassignVehicle  S5; unassignVehicle  S6; 

Part 2:

Solider Squad 2 move waypoints towards the Transport Squad, closest Move Waypoint Synced to Transport Squad Load Waypoint.

In the Soilder Squads On Act area of the synced Move waypoint is the following:

S1 assignAsCargo T1; S2 assignAsCargo T1; S3 assignAsCargo T2; S4 assignAsCargo T2; S5 assignAsCargo T3; S6 assignAsCargo T3; [s1,S2,S3,S4,S5,S6] orderGetIn true;

Transport Squad has a number of move waypoints and then a transport Unload waypoint synced to the Soilder Squad GetOut Waypoint

Part 3:

Repeats of Part 2

Part 2 works if it is not preceded by part 1. So im guessing for some reason the soldiers do not reslise they are allowed to embark again.

I have tried putting the code in a in.sqf and out.sqf and using

_handel = execVm "in.sqf"; 

But that didn't work either

I hope I've explained my issue clearly and someone can help.

Thanks for taking the time to read this.

Edited by nighteyes13

Share this post


Link to post
Share on other sites

I think it is very doable using Waypoints in the editor. You synch GetIn waypoints for squad with LOAD waypoints for transport vehicle. And synch Getout waypoints for squad with TransportUnload (I forget exact waypoint name) for transport vehicle. By synching, the transports won't leave until the squads get in.

For having a squad of six split up and board 3 different transport vehicles, try using GETINNEAREST near the 3 vehicles. You may have to disable some crew spots in each of the 3 vehicles so there is only room for two passengers in each of the 3 vehicles. That way the AI won't pile them all into one vehicle.

Share this post


Link to post
Share on other sites

I have issues when I use Transport unload waypoints I think it's broken. Units just stand around kicking their heals.

1.Try using the Advance Land Waypoint with the unassigns in the On Act (I noticed there are synch issues,keeps taking off too early)

or

1. It maybe better just to use a normal move waypoint with heli land "land" in the on act before the unassigns.

2.Place another Waypoint (move) for the chopper right next to it.

3.You will need a move waypoint for the group getting out of the chopper place it some where near the vehicles and in the on act put your AssignAsCargo codes.

4. synchwaypoinst 2. and 3. so heli will take off when group get to 3.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Thanks for your responses JohnnyBoy and F2k Sel,

Using only waypoints did not work for me. A GETINNEAREST and LOAD waypoint synced together did not work.

As F2k Sel said there is an issue with the TRANSPORT UNLOAD waypoint, if the solider squad gets out of the vehicles because of the TRANSPORT UNLOAD waypoint the solution will not work.

So how I got this to work is as follows.

a) Have a trigger in the location that you want the soldiers to get out with the following in it:

null = execVM "out.sqf";

out.sqf

unassignVehicle  S1; 
unassignVehicle  S2; 
unassignVehicle  S3; 
unassignVehicle  S4; 
unassignVehicle  S5; 
unassignVehicle  S6;  

This will cause an Disembark order and the squad to get out.

Then have a LOAD waypoint synced with another the solider squads MOVE or GETINNEAREST waypoint. in the solider squads ON ACT waypoint have:

S1 assignAsCargo T1; S2 assignAsCargo T1; S3 assignAsCargo T2; S4 assignAsCargo T2; S5 assignAsCargo T3; S6 assignAsCargo T3; [s1,S2,S3,S4,S5,S6] orderGetIn true;  

This will work any number of time ONLY IF the soldiers have disembarked due to the unassignVehicle command.

I was unable to get the unassignVehicle command to work from the ON ACT scripting box.

Obviously this is not a generic implantation yet so I will do some more work on it. Id like to make this into a generic get in function such as GETINTRANSPORT(TRANSPORT_SQUAD, SOLIDER_SQUAD) and GETOUTTRANSPORT(SOILDER_SQUAD)

Share this post


Link to post
Share on other sites

Thanks for posting your working solution, as this will helps the next guy having the same need. This helps build our community knowledge base!

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  

×