---
name: "BIS_fnc_planeEjection"
type: function
status: ok
groups: ["Aircraft Functionality"]
arma3_since: "1.70"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_planeEjection
revid: 376186
updated: 2025-09-13T15:54:41Z
---

# BIS_fnc_planeEjection

*Function · Aircraft Functionality · Arma 3 v1.70*

Locality: executed with **spawn**

## Description

- This function is designed to implement semi-authenthic ejection system on fixed wing aircrfat that have such functionality enabled/configured.

## Syntax

```sqf
[plane, delay] spawn BIS_fnc_planeEjection
```

**Parameters:**

- `plane`: [Object](../topics/Object.md) - living vehicle with a pilot and with ejection systems set up in its config
- `delay`: [Number](../topics/Number.md) - (Optional, default -1) delay in seconds between function execution and when the ejection actually happens. 0 or lower means no delay.

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
[_plane, 2] spawn BIS_fnc_planeEjection;
```

## Function header

The comment at the top of the function's file in the game; this page's description come from it.

```sqf
/*
Author: Bravo Zero One development
- John_Spartan

Description:
- This function is designed to implement semi-authenthic ejection system on fixed wing aircrfat that have such functionality enabled/configured.

Exucution:
- Call the function via user action added to the aircrfat itself.

        class Plane_Eject_UserActionExample
        {
            priority = 0.05;
            shortcut = "Eject";
            displayName = "$STR_A3_action_eject";
            condition = "player in this";
            statement = "[this] spawn BIS_fnc_planeEjection";
            position = "pilotcontrol";
            radius = 10;
            onlyforplayer = 1;
            showWindow = 0;
                    hideOnUse = 1;
        };

Requirments:
- Compatible aircrfat must have a config definition for all sub-sytems that will be invoked by this function.
    1. Old legacy ejection must be disabled in aircrfat's cfgVehicles configuration.
    driverCanEject = 0;
    gunnerCanEject = 0;
    cargoCanEject = 0;

    2. Aircrfat must have a set of parameters defined in CfgVehicles subClass (EjectionSystem) for ejection system. Theese parameters will affect the ejection behaviour.
    example of cfgVehicles subclass definitions;

    class EjectionSystem
    {
        EjectionSeatEnabled = 1;                                        //enable advanced ejection system
        EjectionDual = 0;                                            //currently only single seat aircraft ejectiion supported (to do for latter)
        EjectionSeatClass = "B_Ejection_Seat_Plane_Fighter_01_F";                                //class name of ejector seat to use (separate vehicle/object)
        CanopyClass = "Plane_Fighter_01_Canopy_F";                                //class name of canopy to use (separate vehicle/object)
        EjectionSeatHideAnim = "ejection_seat_hide";                                //name of the hide animation that will hide ejector seat mesh in plane
        EjectionSeatRailAnim = "ejection_seat_motion";                                //name of the animation that will be played to start a smooth ejection motion out of cockpit
        CanopyHideAnim = "canopy_hide";                                        //name of the hide animation that will hide canopy mesh in plane
        EjectionSeatPos = "pos_eject";                                        //position memory point whwre to attach ejector seat
        CanopyPos = "pos_eject_canopy";                                        //position memory point where to attach dummy canopy
        EjectionSoundExt = "Plane_Fighter_01_ejection_ext_sound";                        //sound to play when ejection trigered (external)
        EjectionSoundInt = "Plane_Fighter_01_ejection_in_sound";                        //sound to play when ejection trigered (in-ternal)
        EjectionParachute = "Steerable_Parachute_F";                                //class name parachute used in ejection
        EjectionSeatForce = 50;                                            //ejection seat blast force
        CanopyForce = 30;                                            //canopy bast force

    };

    3. Aircrfat model must have momory points definig positions where to attach new vehicle ejector seat, new vehicle canopy.
    4. Aircrfat model (in model cfg & class AnimationSources) must have a set of hide animations defined to hide ejector seat and canopy in model when new seaparate vehicles are spawned.

    In model.cfg
    class canopy_hide
    {
        type="hide";
        source="user";
        selection="canopy_hide";
        minValue = 0.0;
        maxValue = 1.0;
        minPhase = 0.0;
        maxPhase = 1.0;
        initPhase = 0;
        hideValue = 0.001;
    };

    class ejection_seat_hide
    {
        type="hide";
        source="user";
        selection="ejection_seat";
        minValue = 0.0;
        maxValue = 1.0;
        minPhase = 0.0;
        maxPhase = 1.0;
        initPhase = 0;
        hideValue = 0.001;
    }

    In cfgVehicles >> class AnimationSources
    class canopy_hide
    {
        source = "user";
        animPeriod = 0.001;
        initPhase = 0;
    };

    class ejection_seat_hide
    {
        source = "user";
        animPeriod = 0.001;
        initPhase = 0;
    };

    5. Aircrfat model must have an animation for initial ejection stage, where new ejector seat with pilot is pushed gradualy out of cockpit (done to avaoid PhysX colisions and make this feature look good, rathre than spawnig ejetor seat above plane).
    New ejector seat with pilot will be attached to this animation (via animated meory point).
    Memory point EjectionSeatPos must be part of this animated selection.

    In model.cfg
    class ejection_seat_motion
    {
        type = "translation";
        source = "user";
        selection = "ejection_seat";
        begin = "tns_ejection_seat";
        end = "tns_ejection_seat_e";
        animPeriod = 0;
        memory = 1;
        minValue = 0.0;
        maxValue = 1.0;
        offset0 = 0.0;
        offset1 = 3.0;
    };

    In cfgVehicles >> class AnimationSources
    class ejection_seat_motion
    {
        source = "user";
        animPeriod = 0.25;
        initPhase = 0;
    };

    6. Ejector seat and canopy must be created/defined as separate objects. Can be reused.

Parameter(s):
    _this select 0: mode (Scalar)
    0: plane/object

    other parameters are gathered from configuration files.

Returns: nothing
Result: Pilot will be ejected from aircraft. Semi-authenthic behaviour.
*/
```

## See also

[BIS_fnc_planeAiEject](../functions/BIS_fnc_planeAiEject.md) · [BIS_fnc_planeEjectionFX](../functions/BIS_fnc_planeEjectionFX.md) · [BIS_fnc_ejectionSeatRelease](../functions/BIS_fnc_ejectionSeatRelease.md)

<sub>Source: [BI Community Wiki — BIS fnc planeEjection](https://community.bistudio.com/wiki/BIS_fnc_planeEjection) (revision 376186).</sub>
