Jump to content
Sign in to follow this  
xripx

Start squad in transport

Recommended Posts

I'm sure this has been asked before, however I couldn't find it. Apologies in advance, I know it's bad netiquette.

Real simple, how do I start a squad out in a transport when they're not in the same squad as the transport?

Thanks

Share this post


Link to post
Share on other sites
Guest

unitname moveincargo transport name

Put that in the inisialisation field of the unit you want in the transport vehicle.

Share this post


Link to post
Share on other sites

Use assignAsCargo first!

_soldier1 assignAsCargo _truck;
_soldier1 moveInCargo _truck;

Edited by twirly

Share this post


Link to post
Share on other sites

easier way is to use the foreach command in leaders init:

{_x assignAsCargo vehiclename; _x moveInCargo vehiclename} foreach units group this;

Now you only need to this in leaders initline instead of all the units initline.

Share this post


Link to post
Share on other sites

Excellent, thank you so much guys. To avoid questions like this in the future, is there a good a database for scripts like this? If so, please let me know.

Share this post


Link to post
Share on other sites

When I try to do what Demonized advised, only the squad leader starts inside the APC. The rest of the squad starts outside.

Please help. This is getting really fucking infuriating.

Share this post


Link to post
Share on other sites

Does your vehicle have cargo seats to begin with? Tanks usually just have turret/commander/driver seats, cargo seats are rare if your vehicle isn't normally used to transport units.

If you want your team to start in the turret seats, you also have to consider the limitation of turret-seats in one vehicle and have to manually (you could also do it automatically but it's just too much work if its just for one specific vehicle) set the turret path in order to use moveInTurret

Share this post


Link to post
Share on other sites

taken from twirlys old utes mv22 paradrop demo, yes it works for vehicles too.

loadsquads.sqf


//move sqd1 into truck
for "_i" from 0 to (count (units sqd1)-1) do {
_unit = (units sqd1) select _i;
_unit assignAsCargo truck1;
_unit moveInCargo truck1;
sleep 0.5;
};

//move sqd2 into truck
for "_i" from 0 to (count (units sqd2)-1) do {
_unit = (units sqd2) select _i;
_unit assignAsCargo truck1;
_unit moveInCargo truck1;
sleep 0.5;
};

need to kick them out at a specific waypoint?

ejectsquads.sqf

//basically do the reverse of putting them in
//eject squad 1
for "_i" from 0 to (count (units sqd1)-1) do {
_unit = (units sqd1) select _i;
   unAssignVehicle _unit ;
_unit action ["EJECT", truck1];
sleep 0.5;
};

sleep 1;

//eject squad 2
for "_i" from 0 to (count (units sqd2)-1) do {
_unit = (units sqd2) select _i;
   unAssignVehicle _unit;
   _unit action ["EJECT", truck1];
sleep 0.5;
};

to load in the troops add to init.sqf: nul = [] execVM "loadsquads.sqf";

to kick the squads out at waypoint:

in the [On Act] empty field of a waypoint add: nul = [] execVM "ejectsquads.sqf";

lastly make sure each leader has this in their init field:

team leader of the first group Init field: sqd1 = group this;

team leader of the second group Init field: sqd2 = group this;

Edited by MadM0nkey
i try

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  

×