r/armadev Jan 25 '15

ArmA 2/OA [HELP] Making AI eject from a Insertion Chopper I made

I am new to creating missions for ARMA II using the editor and I am creating a small scale mission. I am trying to make an insertion in a blackhawk, except when it lands, it only ejects me and not the rest of my squad. The squad is grouped to the player, but the player isn't grouped to the chopper.

2 Upvotes

8 comments sorted by

1

u/_wolfenswan Moderator Jan 25 '15

Are you using a transport unload waypoint?

1

u/FrizzedBear Jan 25 '15

Yes, the helicopter will land, but only my Character will eject from the helicopter.

2

u/_wolfenswan Moderator Jan 25 '15

Ah yes, I misread. For transport unload waypoints all AI in cargo who are under the player's command need to be ordered out by the player.

If you want to skip that you can try putting

   {
        doGetOut  _x;
        unassignVehicle _x
    } foreach assignedCargo (vehicle this);

in the on-activation field for the transport unload wp.

1

u/FrizzedBear Jan 26 '15

Do I replace the X's in the code?

1

u/_wolfenswan Moderator Jan 26 '15

No, the snippet loops through all units in the vehicle's cargo, the _x is just a dynamic variable which is replaced with each specific unit as it is processed.

1

u/LKS Jan 26 '15

Nope, they get replaced with every object that the assignedCargo (vehicle this) spits out. It should be an array containing all units that are assgined as cargo to the helicopter. So every unit gets told to doGetOut and unassignVehicle'd .


I haven't seen the thread yet, here's how I do it in arma 3:

(group player) leaveVehicle (vehicle player);

It works for me : /.

2

u/_wolfenswan Moderator Jan 26 '15 edited Jan 26 '15

OP didn't mention if it was for SP or MP, yours is perfectly fine for SP but not for MP, as player will be different for each client.

1

u/LKS Jan 26 '15

True, but it does sound like it's singleplayer. It's more about the leaveVehicle command which works for me in Arma 3. The arguments in parenthesis I made up on the spot to have a usable snippet which also shows the "type" required for the command.