Jump to content
James Sullivan

Eject players form a vehicles / helicopter

Recommended Posts

Hello,

I'm here for a question, and maybe an answer for my problem.

I've made a mission for me and my team (ALiVE, ACE3, RHS ...) and we've got a little problem, when a player is down (unconscious with ACE3 Medical System), we can force him to be in a vehicle or an helicopter for a evacuation, but we have a little bug, we can't unload him ! And I want to know if it's possible to have a init code, or a script to eject every player from a vehicles or helicopter.

Thanks for your help !

Share this post


Link to post
Share on other sites

Thanks for your link, but I'm not sure if it's the good solution for me, I can't write the unit who must be ejected because I can't know who will be injured in mission, I'm not sure to be clear.

The mission is not scripted, I'm working with ALiVE for my mission.

Share this post


Link to post
Share on other sites

if (vehicle player != player) then {
player action ["eject", (vehicle player)];
};

there you go :)

  • Thanks 1

Share this post


Link to post
Share on other sites
if (vehicle player != player) then {
player action ["eject", (vehicle player)];
};

there you go :)

Thanks, I will test this ! I will give my feedback about this tomorrow ! ;)

Share this post


Link to post
Share on other sites

Sorry, I didn't have the time to test this today ! Where did I need to put this code ? In the init code of the vehicles ?

Share this post


Link to post
Share on other sites

you place this where ever you want it to eject from the vehicle, placing in the init wont help much. at the moment you want the unit to be eject inside your code thats where you place it

Share this post


Link to post
Share on other sites
On 2015-6-3 at 11:22 PM, James Sullivan said:

Sorry, I didn't have the time to test this today ! Where did I need to put this code ? In the init code of the vehicles ?

 did you find a solution? I am also interested in this.  When a player in unconscious in ACE3 is unable to make any action, consecuently he cannot eject or get out.  In other words, we need to find a way that the helicopter crew kicks him out when the chopper has landed.

 

Share this post


Link to post
Share on other sites

Since you are using ace, just use the ace interaction system to load the injured player into the chopper. When you get to the destination use ace interaction to interaction>passengers>name of passenger>unload
make sure you are running the ace compatibility pbo located in the ace mods optional folder for the RHS mod you are using.

Share this post


Link to post
Share on other sites

What happens if you use the "transport unload" waypoint? That should kick out every player that is being transported, no matter his status.

Share this post


Link to post
Share on other sites

You can also use
 

{
	if (vehicle _x == yourVehicleVariableName) then {moveOut _x};
}forEach allPlayers;

 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Try this.

 

_passengers = [];
_crew = crew _yourvehicle;
_dir = direction _yourvehicle;
//Get everyone except the crew.
{
    _isCrew = assignedVehicleRole _x;
        if(count _isCrew > 0) then
    {
        if((_isCrew select 0) == "Cargo") then
        {
        _passengers pushback _x
        };
    };
} foreach _crew;
//Now moveout only passengers leaving the crew inside.
{
    _x disableCollisionWith _yourvehicle;
    _x allowdamage false;
    unassignvehicle _x;
    moveout _x;
    _x setDir (_dir + 90);// Passengers exit _yourvehicle at right angles.
    sleep 0.6;//space the Passengers out a bit so they're not all bunched up.
    _x allowdamage true;
} forEach _passengers;
  • Like 1
  • Thanks 1

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

×