Jump to content
Sign in to follow this  
InfantryMan

Boat Insertion: how to force team to GET OUT

Recommended Posts

Greetings all,

I am new to BI Forums, but not new to Arma2 editing :)

I am creating a mission with a boat insertion. Here's what I want to do:

1. To start, my SEAL team (with player as Team Leader) will be moving in cargo in a CRRC boat driven by an AI soldier.

2. The boat will move to an insertion point somewhere on the shore.

3. Once that point is reached, my SEAL team (including me the player) will automatically GET OUT of the boat (not EJECT) without any commands from me. The AI boat driver will remain in the boat.

4. Once insertion is complete, the boat with driver go back out into the sea (to link up with some make-believe mother ship).

My problem is that I can't figure out how to make the team get out in an orderly manner (one after the other). TRANSPORT UNLOAD waypoint by itself does not work. I am able to have my team "ejected" from the boat by emplacing a trigger at the insertion point, but it looks messy and unorganized.

Anyone know how to help?

Thanks in advance.

Share this post


Link to post
Share on other sites

Transport unload-waypoint should throw you out and then you have to order your AI to get out too. As far as I know that's the only way.

Share this post


Link to post
Share on other sites

use this in the wp:

{unassignvehicle _x; dogetout _x} foreach units group player;

This will force all AI + player to automatically exit the vehicle, getout (not eject).

Share this post


Link to post
Share on other sites

{unassignvehicle _x; _x setPos getPos _boat;}ForEach crew _boat; And all units in boat will jump out :)

Share this post


Link to post
Share on other sites
{unassignvehicle _x; _x setPos getPos _boat;}ForEach crew _boat; And all units in boat will jump out :)

How about the boat driver?

Share this post


Link to post
Share on other sites
How about the boat driver?

Sorry :) Not read first post... :)

{if (_x != driver _boat) then {unassignvehicle _x; _x setPos getPos _boat;};}ForEach crew _boat; :) After this send command "_boat doMove _homebase;" :)

Edited by DAP

Share this post


Link to post
Share on other sites

3. Once that point is reached, my SEAL team (including me the player) will automatically GET OUT of the boat (not EJECT) without any commands from me. The AI boat driver will remain in the boat.

:( Shame

Share this post


Link to post
Share on other sites

You could just eject the players group.

{unassignvehicle _x;_x setPos getPos _boat;}ForEach  units player;

or

{_x action ["eject",boat]} ForEach  units player

or if they start to go after the vehicle

{_x action ["eject",boat];unassignvehicle _x;} ForEach  units player

Edited by F2k Sel

Share this post


Link to post
Share on other sites
:( Shame

{if (_x != driver _boat) then {unassignvehicle _x; _x setPos getPos _boat;};}ForEach crew _boat; After this send command "_boat doMove _homebase;"

:) It will be work :) Driver will stay in boat :)

Share this post


Link to post
Share on other sites
How about the boat driver?

As i understood from the OP the boat driver is in his own group with his own wps, at least thats how i would do it.

So only need to getout for all units in player group(all the seals + player) as i described above, then boat would move on with his own wps and seal group player will do their thing.

Only issue i can see is that shorelandings can be tricky depending on how steep the ocean is getting deeper.

but putting the wp near or just on land and have a trigger grouped to the group or boat and use the getout part in that trigger when present. would work around that, also in the wp have in condition:

true OR {(vehicle _x) != boatname} foreach units group player;

that way if boat either completes its wp, or if all units of the player group is not inside the boat wp will be considered completed and boat will move to next wp.

Note: Also when using moveInCargo you also need to assignAsCargo so the boat actually knows units are in cargo for transport unload wps to work correctly.

TU wps may work sometimes, or not work if you dont.

At the point you need to have the seals in the boat, fex mission start put this in group leader init, a trigger, a script or wherever you want. does not matter as group is determined by player.

{_x assignAsCargo boatname; _x moveInCargo boatname} foreach units group player.

Share this post


Link to post
Share on other sites
As i understood from the OP the boat driver is in his own group with his own wps, at least thats how i would do it.

Yes, the boat driver is NOT part of the SEAL team (which the player leads). He drives the boat and nothing else, earning minimum wage.

Give me a few hours to play around with these codes and I'll get back to y'all. (I would do it now but the wife wants me to cook dinner...:yay:)

Share this post


Link to post
Share on other sites

I tried all of the techniques you guys laid out, unfortunately none of them are working. Do I have to assign the team members to the boat before I can unassign them??

Share this post


Link to post
Share on other sites

I did it like this, probably not the best way though...

Assume you have 4 Seal guys.

Make sure they are not grouped together.

Name them Seal1, Seal2, Seal3 and Seal4.

Name the boat: Boat1

In each units init write:

this moveincargo Boat1

And then in the transport Unload waypoint you group them together by writing:

[seal2, Seal3, Seal4] join Seal1;

See if that works.

Share this post


Link to post
Share on other sites

Just did a quick test and it works for me Bracer's method also worked.

Using a transport unload WP to kick out the player.

move the group into the boat and place in leaders init or trigger ect.

{_x moveincargo boat} foreach units player

Place this in the boats init

this addEventHandler ["GETout",{{(_x) action ["getOut",(_this select 0)];} foreach units player;}];

You can also force them into a vehicle rather than have them wonder off for ten minutes sometimes.

this addEventHandler ["GETin",{{(_x) moveincargo (_this select 0);} foreach units player;}];

You can also add the two together in the same vehicles init.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

F2k Sel,

Your method works, but it ejects the entire team all at once. I was hoping the team would exit the boat in an orderly fashion i.e. "Get out" instead of "eject."

Is there any way to alter the code your provided so that there will be a delay between each member ejecting?

Share this post


Link to post
Share on other sites

Hate to be rude, but I have done this exact same thing with only the use of the search button and I have zero coding knowledge except for what I read....and this is something really so simple (after you read) and I can't understand how it gets so many replys when the legit questions get ignored. Really...this is in one of the first tutorials I read. Place boat...name it...transport unload wp...place group...name it...addincargo...getout wp...sync with transport unload wp...wow magic.

Share this post


Link to post
Share on other sites
Hate to be rude, but I have done this exact same thing with only the use of the search button and I have zero coding knowledge except for what I read....and this is something really so simple (after you read) and I can't understand how it gets so many replys when the legit questions get ignored. Really...this is in one of the first tutorials I read. Place boat...name it...transport unload wp...place group...name it...addincargo...getout wp...sync with transport unload wp...wow magic.

An AI group will get out but not if controlled by the player, OP asks for it be done automatically.

vehicles init

this addEventHandler ["GETout",{ [_this] execVM "getout.sqf"}];

save script as getout.sqf two second delay between each exit.

_veh = _this select 0;
{
   (_x) action ["getOut",_veh select 0];
sleep 2;

} foreach units player;

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  

×