{"name":"Arma 3: Respawn","title":"Arma 3: Respawn","type":"topic","url":"https://community.bistudio.com/wiki/Arma_3:_Respawn","revid":378634,"updated":"2026-05-15T12:14:41Z","aliases":["Arma 3 Respawn","Arma 3 Respawn: New Respawn Screen","Arma 3: Respawn: New Respawn Screen","CfgRespawnTemplates"],"markdown":"### Settings\n\n- Some basic settings can be set up in Eden Editor\n- Description.ext and/or Campaign Description.ext allow for full control over all available respawn settings\n\n### Scripting\n\n**Scripting Commands**\n\n- playerRespawnTime\n- setPlayerRespawnTime\n- respawnVehicle\n\n**Scripting Functions**\n\n- Respawn Functions\n\n**Event Scripts**\n\n- onPlayerRespawn.sqf\n- onPlayerKilled.sqf\n\n### Respawn Types\n\nType is represented either by respawn ID, or by its name.\n\n```cpp\nrespawn = \"BASE\";\nrespawn = 3;\n```\n\n| ID | Name | Description | Default Templates | onPlayerKilled | onPlayerRespawn |\n|---|---|---|---|---|---|\n| 0 | \"NONE\" | Show singleplayer death screen | N/A | ✓ | ✗ |\n| 1 | \"BIRD\" | Respawn to a seagull | Spectator, EndMission | ✗ | ✓ |\n| 2 | \"INSTANT\" | Respawn on spot where player died | Instant, Counter | ✓ | ✓ |\n| 3 | \"BASE\" | Respawn on a marker(s) start by following strings:<br>**Unit respawn**<br>- *respawn* (used only when side variant is not found)<br>- *respawn_west*<br>- *respawn_east*<br>- *respawn_guerrila*<br>- *respawn_civilian*<br>**Vehicle respawn**<br>- *respawn* (used only when side variant is not found)<br>- *respawn_vehicle_west*<br>- *respawn_vehicle_east*<br>- *respawn_vehicle_guerrila*<br>- *respawn_vehicle_civilian*<br>You can have multiple markers simply by adding any text behind the name, e.g. *respawn_west1*, *respawn_westBase* etc. When no markers are defined, player is respawned on position where he started the mission. More about marker respawn can be found [here](http://killzonekid.com/arma-scripting-tutorials-respawn-on-marker/). Alternatively you can also use the *Respawn Position* module. | Base, Counter | ✓ | ✓ |\n| 4 | \"GROUP\" | Respawn to the next available playable unit in a group. When none is left, BIRD respawn is used instead. | Group, EndMission | ✗ | ✓ |\n| 5 | \"SIDE\" | Respawn to the next available playable unit of the same side (selected using team switch window). When none is left, BIRD respawn is used instead. | Side, EndMission | ✗ | ✓ |\n\n### Respawn Templates\n\n> [!WARNING]\n> Respawn Templates are **case-sensitive!**\n\nTemplates are pre-defined scripts called when player dies and respawns. They are defined in an array and can be combined together.\n\n```cpp\nrespawnTemplates[] = { \"MenuInventory\", \"MenuPosition\" };\n```\n\nAdditionally, you can define side specific templates. When a side has no unique templates, it will use general *respawnTemplates* instead.\n\n```cpp\nrespawnTemplatesWest[] = { \"MenuInventory\" };\nrespawnTemplatesEast[] = { \"Counter\" };\nrespawnTemplatesGuer[] = { \"Tickets\" };\nrespawnTemplatesCiv[] = { \"Spectator\" };\nrespawnTemplatesVirtual[] = {}; // Virtual players, used mainly in Curator (Zeus) missions\n```\n\n> [!IMPORTANT]\n> When the `respawnTemplates` entry is missing, default templates based on the respawn type are used.\n\n#### Conflicts\n\nThe respawn templates \"MenuPosition\" and \"Spectator\" are **not** compatible since MenuPosition will force the map open. Instead you can use the following settings to get access to the full spectator mode:\n\n```cpp\n// description.ext\nrespawn = 3;\nrespawnTemplates[] = { \"MenuPosition\", \"Spectator\" };\n```\n\n```sqf\n// initPlayerLocal.sqf\n// --- Enable full spectator in respawn screen\n{\n    missionNamespace setVariable [_x, true];\n} forEach [\n    \"BIS_respSpecAI\",                    // Allow spectating of AI\n    \"BIS_respSpecAllowFreeCamera\",        // Allow moving the camera independent from units (players)\n    \"BIS_respSpecAllow3PPCamera\",        // Allow 3rd person camera\n    \"BIS_respSpecShowFocus\",            // Show info about the selected unit (dissapears behind the respawn UI)\n    \"BIS_respSpecShowCameraButtons\",    // Show buttons for switching between free camera, 1st and 3rd person view (partially overlayed by respawn UI)\n    \"BIS_respSpecShowControlsHelper\",    // Show the controls tutorial box\n    \"BIS_respSpecShowHeader\",            // Top bar of the spectator UI including mission time\n    \"BIS_respSpecLists\"                    // Show list of available units and locations on the left hand side\n];\n```\n\n#### Official Templates\n\n| Class | Description | Preview |\n|---|---|---|\n| **None** | Singleplayer death screen. Default in singleplayer. |  |\n| **Spectator** | Spectator Mode. |  |\n| **Instant** | Currently empty. |  |\n| **Base** | Currently empty. |  |\n| **Group** | Cutscene showing a newly controlled unit. |  |\n| **Side** | Cutscene showing a newly controlled unit. |  |\n| **Seagull** | Operation Flashpoint-style seagull respawn |  |\n| **Wave** | Adjusts respawn counter so players spawns together. Wave delay is based on *respawnDelay* and Player's respawn time is set between 1 and 2 times *respawnDelay*: if *respawnDelay* is set to e.g 10, respawn waves happen every 10 seconds. If a player dies and the next respawn wave is in 3 seconds, the player's respawn time is set to 17 seconds to match the next wave. |  |\n| **SwitchPlayer** | Swichtes to another unit upon death. |  |\n| **Tickets** | Use a limited respawn ticket pool for players. Pool can be applied to everyone, a side, a group or a single unit.<br>Use BIS_fnc_respawnTickets to update the amount of available tickets. Note that the template will have no effect if this function is never used, meaning players outside of all given pools will have infinite respawns. |  |\n| **TicketsSpawn** | Substracts ticket **after** respawn. |  |\n| **Counter** | Show a simple respawn countdown. |  |\n| **EndMission** | Automatically fail the mission once all players are dead (for NONE, BIRD, GROUP and SIDE respawn types) or when all respawn tickets are exceeded (for INSTANT and BASE respawn types with *Tickets* template) |  |\n| **MenuPosition** | Lets players select from available respawn positions defined either by *respawn markers*, see Respawn Types, by BIS_fnc_addRespawnPosition function or by the *Respawn Position* module. A new screen was released with Arma 3 v1.60 and brings new functionalities together with a new design.<br>**Item disabling**<br>- Respawn positions can be disabled automatically (e.g., unit used as respawn point is dead) or manually by calling BIS_fnc_showRespawnMenuDisableItem |  |\n| **MenuInventory** | Lets players pick a respawn loadout defined in CfgRespawnInventory. Loadouts can be added using BIS_fnc_addRespawnInventory function. A new screen was released with Arma 3 v1.60 and brings new functionalities together with a new design.<br>**Role selection**<br>- Respawn inventories are sorted in to Roles which can be defined in CfgRoles.<br>**Item disabling**<br>- Roles and loadouts can be disabled. This can happen automatically (e.g., Role/loadout limit was reached) or can be manually by calling BIS_fnc_showRespawnMenuDisableItem.<br>**Limits**<br>- Roles and loadouts can be limited. This way only limited number of player can use given role/loadout in a mission. For details on how to do that see BIS_fnc_addRespawnInventory. |  |\n\n**Options shared by *MenuInventory* and *MenuPosition***\nBoth templates feature a similar respawn UI and therefore share the following options:\n\n- **Timeout disabling**\n  - Mission designer can disable the timeout used between death of a unit and opening of the respawn screen:\n\n    ```sqf\n    missionNamespace setVariable [\"BIS_RscRespawnControls_skipBlackOut\", true, true];    // disable timout\n    missionNamespace setVariable [\"BIS_RscRespawnControls_skipBlackOut\", nil, true];    // reset to original timeout\n    ```\n- **Autorespawn**\n  - A checkbox can be ticket to let the player automatically respawn once the coundown reached 0. If disabled player is not respawned immediately, but must confirm selection by clicking on \"RESPAWN\" button.\n- **Spectator Camera**\n  - The Spectator Camera used in here is slightly modified (no free camera available etc.) version of Spectator Mode. For full documentation see Spectator Mode documentation.\n  - Mission designer needs to use the **Spectator** respawn template, the camera is disabled otherwise.\n\n#### Custom Respawn Templates\n\nNew templates can be defined in global Config.cpp or in mission and campaign Description.ext files.\n**Example**:\n\n```cpp\nclass CfgRespawnTemplates\n{\n    // Class used in respawnTemplates entry\n    class myTag_beacon\n    {\n        // Function or script executed upon death. Parameters passed into it are the same as are passed into onPlayerKilled.sqf file\n        onPlayerKilled = \"\\myAddon\\scripts\\respawnBeacon.sqf\";\n\n        // Function or script executed upon respawn. Parameters passed into it are the same as are passed into onPlayerRespawn.sqf file\n        onPlayerRespawn = \"\\myAddon\\scripts\\respawnBeacon.sqf\";\n\n        // Default respawn delay (can be overwitten by description.ext entry of the same name)\n        respawnDelay = 20;\n\n        // 1 to respawn player when he joins the game. Available only for INSTANT and BASE respawn types\n        // Can be overridden by description.ext attribute of the same name\n        respawnOnStart = 1;\n\n        // By default onPlayerKilled and onPlayerRespawn function are spawned\n        // set to 1 to run in unscheduled, called functions MUST NOT return an assignment or respawn will break\n        isCall = 0;\n    };\n\n    class Spectator\n    {\n        onPlayerRespawn = \"BIS_fnc_respawnSpectator\";\n    };\n};\n```\n\n> [!IMPORTANT]\n> For a template's `respawnDelay` to be considered, Description.ext's `respawnDelay` **must** be defined and have a negative value due to BIS_fnc_selectRespawnTemplate code.\n>\n> ```cpp\n> respawnDelay = -1;\n> ```\n\n### Loadouts and Roles\n\nThe main purpose of the roles is to make things more clear and simple for player when selecting loadout. All the loadouts available in a mission are now divided into various roles.\nMission designer can use roles already created in the game config, or custom roles can be defined in Description.ext. Loadouts with no role assigned are automatically assigned to the *Default* role.\n**Loadout config example:**\n\n```cpp\nclass CfgRoles\n{\n    class Assault // Class name used in CfgRespawnInventory\n    {\n        displayName = \"$STR_A3_Role_Assault\"; // Name of the role, displayed in the respawn menu\n        icon = \"a3\\missions_f_exp\\data\\img\\classes\\assault_ca.paa\"; // Icon shown next to the role name in the respawn screen\n    };\n};\n\nclass CfgRespawnInventory\n{\n    class B_SquadLeader // Class of the respawn inventory, used by BIS_fnc_addRespawnInventory\n    {\n        displayName = \"$STR_b_soldier_sl_f0\"; // Name of the respawn inventory\n        role = \"Assault\"; // Role the respawn inventory is assigned to\n        icon = \"\\A3\\ui_f\\data\\map\\VehicleIcons\\iconManLeader_ca.paa\"; // Icon shown next to the role\n        show = \"side group _this == west\"; // Condition used to make specific respawn inventories only available for specfic sides, must return [[Boolean]]\n        weapons[] = { // Weapons\n            \"arifle_SPAR_01_khk_F\",\n            \"Rangefinder\",\n            \"hgun_P07_khk_F\"\n        };\n\n        magazines[] = { // Magazines\n            \"SmokeShell\",\n            \"SmokeShell\",\n            \"16Rnd_9x21_Mag\",\n            \"16Rnd_9x21_Mag\",\n            \"16Rnd_9x21_Mag\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"HandGrenade\",\n            \"HandGrenade\"\n        };\n\n        items[] = { // Useable items\n            \"FirstAidKit\"\n        };\n\n        linkedItems[] = { // Linked items, also weapon items, helmet etc.\n            \"V_PlateCarrierSpec_tna_F\",\n            \"H_HelmetB_Enh_tna_F\",\n            \"optic_ERCO_blk_F\",\n            \"acc_pointer_IR\",\n            \"NVGoggles_tna_F\",\n            \"ItemGPS\",\n            \"ItemMap\",\n            \"ItemCompass\",\n            \"ItemWatch\",\n            \"ItemRadio\"\n        };\n\n        uniformClass = \"U_B_T_Soldier_SL_F\"; // uniform\n    };\n```\n\n**Export Function**:\n\n- The following function will copy a complete respawn inventory to your clipboard, see function header for more information.\n\n**Author:** R3vo\n\n```sqf\n/*\n    Author: R3vo\n\n    Description:\n    Retrieves loadout of unit and formats it for CfgRespawnLoadouts. Content is copied to clipboard and returned by function.\n\n    Parameter(s):\n    0: Object - Object to take the loadout from\n    1: String - Class name of the respawn loadout\n    2: String - Display name of the respawn loadout\n    3: String - Icon path displayed next to display name\n    4: String - Loadouts are assigned to a role, possible values:\n        \"Assistant\"\n        \"CombatLifeSaver\"\n        \"Crewman\"\n        \"Default\"\n        \"Grenadier\"\n        \"MachineGunner\"\n        \"Marksman\"\n        \"MissileSpecialist\"\n        \"Rifleman\"\n        \"Sapper\"\n        \"SpecialOperative\"\n        \"Unarmed\"\n    5: String - Condition for the respawn loadout to be shown. Code inside string has to return boolean. _this refers to the unit inside the respawn screen\n\n    Returns:\n    String - Exports formatted loadout\n*/\n\nparams\n[\n    [\"_object\", player, [objNull]],\n    [\"_class\", \"REPLACE\", [\"\"]],\n    [\"_displayName\", \"REPLACE\", [\"\"]],\n    [\"_icon\", \"\\A3\\Ui_f\\data\\GUI\\Cfg\\Ranks\\sergeant_gs.paa\", [\"\"]],\n    [\"_role\", \"Default\", [\"\"]],\n    [\"_conditionShow\", \"true\", [\"\"]]\n];\n\nprivate _indent = \"    \";\nprivate _class = format [\"class %1\", _class];\nprivate _displayName = format [\"displayName = \"\"%1\"\";\", _displayName];\nprivate _icon = format [\"icon = \"\"%1\"\";\", _icon];\nprivate _role = format [\"role = \"\"%1\"\";\", _role];\nprivate _conditionShow = format [\"show = \"\"%1\"\";\", _conditionShow];\nprivate _uniformClass = format [\"uniformClass = \"\"%1\"\";\", uniform _object];\nprivate _backpack = format [\"backpack = \"\"%1\"\";\", backpack _object];\nprivate _export = _class + endl + \"{\" + endl + _indent + _displayName + endl + _indent + _icon + endl + _indent + _role + endl + _indent + _conditionShow + endl + _indent + _uniformClass + endl + _indent + _backpack + endl;\nprivate _weapons = weapons _object;\nprivate _primWeaponItems = primaryWeaponItems _object;\nprivate _secWeaponItems = secondaryWeaponItems _object;\nprivate _assignedItems = assignedItems _object;\n// From BIS_fnc_exportLoadout START\nprivate _fnc_addArray =\n{\n    params [\"_name\", \"_array\"];\n    _export = _export + format [_indent + \"%1[] = {\", _name];\n    {\n        if (_foreachindex > 0) then {_export = _export + \", \";};\n        _export = _export + format [\"\"\"%1\"\"\", _x];\n    } foreach _array;\n    _export = _export + \"};\" + endl;\n};\n\n[\"weapons\", _weapons + [\"Throw\", \"Put\"]] call _fnc_addArray;\n[\"magazines\", magazines _object] call _fnc_addArray;\n[\"items\", items _object] call _fnc_addArray;\n[\"linkedItems\", [vest _object, headgear _object, goggles _object] + _assignedItems - _weapons + _primWeaponItems + _secWeaponItems] call _fnc_addArray;\n// From BIS_fnc_exportLoadout END\n_export = _export + \"};\" + endl + \"// visit https://community.bistudio.com/wiki/Arma_3:_Respawn for detailed information\";\n\ncopyToClipboard _export;\n_export;\n```\n\n> [!IMPORTANT]\n> Loadouts are only available after they were added with the BIS_fnc_addRespawnInventory function!\n\n### Restore Loadout on Respawn\n\n#### Respawn with Original Loadout\n\nIn order to let players respawn with the gear with which they started the mission, create an initPlayerLocal.sqf file in the mission directory (if it does not exist already) and add the following code:\n\n`initPlayerLocal.sqf`\n\n```sqf\nplayer setVariable [\"TAG_StartLoadout\", getUnitLoadout player];\nplayer addEventHandler [\"Respawn\", { private _loadout = player getVariable \"TAG_StartLoadout\"; if (!isNil \"_loadout\") then { player setUnitLoadout _loadout; }; }];\n```\n\n#### Respawn with Death Loadout\n\nThe following code makes the player respawn with the loadout they had on death:\n\n`initPlayerLocal.sqf`\n\n```sqf\nplayer addEventHandler [\"Killed\", { player setVariable [\"TAG_DeathLoadout\", getUnitLoadout player]; }];\nplayer addEventHandler [\"Respawn\", { private _loadout = player getVariable \"TAG_DeathLoadout\"; if (!isNil \"_loadout\") then { player setUnitLoadout _loadout; }; }];\n```","sections":[{"heading":"Settings","level":3,"markdown":"- Some basic settings can be set up in Eden Editor\n- Description.ext and/or Campaign Description.ext allow for full control over all available respawn settings"},{"heading":"Scripting","level":3,"markdown":"**Scripting Commands**\n\n- playerRespawnTime\n- setPlayerRespawnTime\n- respawnVehicle\n\n**Scripting Functions**\n\n- Respawn Functions\n\n**Event Scripts**\n\n- onPlayerRespawn.sqf\n- onPlayerKilled.sqf"},{"heading":"Respawn Types","level":3,"markdown":"Type is represented either by respawn ID, or by its name.\n\n```cpp\nrespawn = \"BASE\";\nrespawn = 3;\n```\n\n| ID | Name | Description | Default Templates | onPlayerKilled | onPlayerRespawn |\n|---|---|---|---|---|---|\n| 0 | \"NONE\" | Show singleplayer death screen | N/A | ✓ | ✗ |\n| 1 | \"BIRD\" | Respawn to a seagull | Spectator, EndMission | ✗ | ✓ |\n| 2 | \"INSTANT\" | Respawn on spot where player died | Instant, Counter | ✓ | ✓ |\n| 3 | \"BASE\" | Respawn on a marker(s) start by following strings:<br>**Unit respawn**<br>- *respawn* (used only when side variant is not found)<br>- *respawn_west*<br>- *respawn_east*<br>- *respawn_guerrila*<br>- *respawn_civilian*<br>**Vehicle respawn**<br>- *respawn* (used only when side variant is not found)<br>- *respawn_vehicle_west*<br>- *respawn_vehicle_east*<br>- *respawn_vehicle_guerrila*<br>- *respawn_vehicle_civilian*<br>You can have multiple markers simply by adding any text behind the name, e.g. *respawn_west1*, *respawn_westBase* etc. When no markers are defined, player is respawned on position where he started the mission. More about marker respawn can be found [here](http://killzonekid.com/arma-scripting-tutorials-respawn-on-marker/). Alternatively you can also use the *Respawn Position* module. | Base, Counter | ✓ | ✓ |\n| 4 | \"GROUP\" | Respawn to the next available playable unit in a group. When none is left, BIRD respawn is used instead. | Group, EndMission | ✗ | ✓ |\n| 5 | \"SIDE\" | Respawn to the next available playable unit of the same side (selected using team switch window). When none is left, BIRD respawn is used instead. | Side, EndMission | ✗ | ✓ |"},{"heading":"Respawn Templates","level":3,"markdown":"> [!WARNING]\n> Respawn Templates are **case-sensitive!**\n\nTemplates are pre-defined scripts called when player dies and respawns. They are defined in an array and can be combined together.\n\n```cpp\nrespawnTemplates[] = { \"MenuInventory\", \"MenuPosition\" };\n```\n\nAdditionally, you can define side specific templates. When a side has no unique templates, it will use general *respawnTemplates* instead.\n\n```cpp\nrespawnTemplatesWest[] = { \"MenuInventory\" };\nrespawnTemplatesEast[] = { \"Counter\" };\nrespawnTemplatesGuer[] = { \"Tickets\" };\nrespawnTemplatesCiv[] = { \"Spectator\" };\nrespawnTemplatesVirtual[] = {}; // Virtual players, used mainly in Curator (Zeus) missions\n```\n\n> [!IMPORTANT]\n> When the `respawnTemplates` entry is missing, default templates based on the respawn type are used."},{"heading":"Conflicts","level":4,"markdown":"The respawn templates \"MenuPosition\" and \"Spectator\" are **not** compatible since MenuPosition will force the map open. Instead you can use the following settings to get access to the full spectator mode:\n\n```cpp\n// description.ext\nrespawn = 3;\nrespawnTemplates[] = { \"MenuPosition\", \"Spectator\" };\n```\n\n```sqf\n// initPlayerLocal.sqf\n// --- Enable full spectator in respawn screen\n{\n    missionNamespace setVariable [_x, true];\n} forEach [\n    \"BIS_respSpecAI\",                    // Allow spectating of AI\n    \"BIS_respSpecAllowFreeCamera\",        // Allow moving the camera independent from units (players)\n    \"BIS_respSpecAllow3PPCamera\",        // Allow 3rd person camera\n    \"BIS_respSpecShowFocus\",            // Show info about the selected unit (dissapears behind the respawn UI)\n    \"BIS_respSpecShowCameraButtons\",    // Show buttons for switching between free camera, 1st and 3rd person view (partially overlayed by respawn UI)\n    \"BIS_respSpecShowControlsHelper\",    // Show the controls tutorial box\n    \"BIS_respSpecShowHeader\",            // Top bar of the spectator UI including mission time\n    \"BIS_respSpecLists\"                    // Show list of available units and locations on the left hand side\n];\n```"},{"heading":"Official Templates","level":4,"markdown":"| Class | Description | Preview |\n|---|---|---|\n| **None** | Singleplayer death screen. Default in singleplayer. |  |\n| **Spectator** | Spectator Mode. |  |\n| **Instant** | Currently empty. |  |\n| **Base** | Currently empty. |  |\n| **Group** | Cutscene showing a newly controlled unit. |  |\n| **Side** | Cutscene showing a newly controlled unit. |  |\n| **Seagull** | Operation Flashpoint-style seagull respawn |  |\n| **Wave** | Adjusts respawn counter so players spawns together. Wave delay is based on *respawnDelay* and Player's respawn time is set between 1 and 2 times *respawnDelay*: if *respawnDelay* is set to e.g 10, respawn waves happen every 10 seconds. If a player dies and the next respawn wave is in 3 seconds, the player's respawn time is set to 17 seconds to match the next wave. |  |\n| **SwitchPlayer** | Swichtes to another unit upon death. |  |\n| **Tickets** | Use a limited respawn ticket pool for players. Pool can be applied to everyone, a side, a group or a single unit.<br>Use BIS_fnc_respawnTickets to update the amount of available tickets. Note that the template will have no effect if this function is never used, meaning players outside of all given pools will have infinite respawns. |  |\n| **TicketsSpawn** | Substracts ticket **after** respawn. |  |\n| **Counter** | Show a simple respawn countdown. |  |\n| **EndMission** | Automatically fail the mission once all players are dead (for NONE, BIRD, GROUP and SIDE respawn types) or when all respawn tickets are exceeded (for INSTANT and BASE respawn types with *Tickets* template) |  |\n| **MenuPosition** | Lets players select from available respawn positions defined either by *respawn markers*, see Respawn Types, by BIS_fnc_addRespawnPosition function or by the *Respawn Position* module. A new screen was released with Arma 3 v1.60 and brings new functionalities together with a new design.<br>**Item disabling**<br>- Respawn positions can be disabled automatically (e.g., unit used as respawn point is dead) or manually by calling BIS_fnc_showRespawnMenuDisableItem |  |\n| **MenuInventory** | Lets players pick a respawn loadout defined in CfgRespawnInventory. Loadouts can be added using BIS_fnc_addRespawnInventory function. A new screen was released with Arma 3 v1.60 and brings new functionalities together with a new design.<br>**Role selection**<br>- Respawn inventories are sorted in to Roles which can be defined in CfgRoles.<br>**Item disabling**<br>- Roles and loadouts can be disabled. This can happen automatically (e.g., Role/loadout limit was reached) or can be manually by calling BIS_fnc_showRespawnMenuDisableItem.<br>**Limits**<br>- Roles and loadouts can be limited. This way only limited number of player can use given role/loadout in a mission. For details on how to do that see BIS_fnc_addRespawnInventory. |  |\n\n**Options shared by *MenuInventory* and *MenuPosition***\nBoth templates feature a similar respawn UI and therefore share the following options:\n\n- **Timeout disabling**\n  - Mission designer can disable the timeout used between death of a unit and opening of the respawn screen:\n\n    ```sqf\n    missionNamespace setVariable [\"BIS_RscRespawnControls_skipBlackOut\", true, true];    // disable timout\n    missionNamespace setVariable [\"BIS_RscRespawnControls_skipBlackOut\", nil, true];    // reset to original timeout\n    ```\n- **Autorespawn**\n  - A checkbox can be ticket to let the player automatically respawn once the coundown reached 0. If disabled player is not respawned immediately, but must confirm selection by clicking on \"RESPAWN\" button.\n- **Spectator Camera**\n  - The Spectator Camera used in here is slightly modified (no free camera available etc.) version of Spectator Mode. For full documentation see Spectator Mode documentation.\n  - Mission designer needs to use the **Spectator** respawn template, the camera is disabled otherwise."},{"heading":"Custom Respawn Templates","level":4,"markdown":"New templates can be defined in global Config.cpp or in mission and campaign Description.ext files.\n**Example**:\n\n```cpp\nclass CfgRespawnTemplates\n{\n    // Class used in respawnTemplates entry\n    class myTag_beacon\n    {\n        // Function or script executed upon death. Parameters passed into it are the same as are passed into onPlayerKilled.sqf file\n        onPlayerKilled = \"\\myAddon\\scripts\\respawnBeacon.sqf\";\n\n        // Function or script executed upon respawn. Parameters passed into it are the same as are passed into onPlayerRespawn.sqf file\n        onPlayerRespawn = \"\\myAddon\\scripts\\respawnBeacon.sqf\";\n\n        // Default respawn delay (can be overwitten by description.ext entry of the same name)\n        respawnDelay = 20;\n\n        // 1 to respawn player when he joins the game. Available only for INSTANT and BASE respawn types\n        // Can be overridden by description.ext attribute of the same name\n        respawnOnStart = 1;\n\n        // By default onPlayerKilled and onPlayerRespawn function are spawned\n        // set to 1 to run in unscheduled, called functions MUST NOT return an assignment or respawn will break\n        isCall = 0;\n    };\n\n    class Spectator\n    {\n        onPlayerRespawn = \"BIS_fnc_respawnSpectator\";\n    };\n};\n```\n\n> [!IMPORTANT]\n> For a template's `respawnDelay` to be considered, Description.ext's `respawnDelay` **must** be defined and have a negative value due to BIS_fnc_selectRespawnTemplate code.\n>\n> ```cpp\n> respawnDelay = -1;\n> ```"},{"heading":"Loadouts and Roles","level":3,"markdown":"The main purpose of the roles is to make things more clear and simple for player when selecting loadout. All the loadouts available in a mission are now divided into various roles.\nMission designer can use roles already created in the game config, or custom roles can be defined in Description.ext. Loadouts with no role assigned are automatically assigned to the *Default* role.\n**Loadout config example:**\n\n```cpp\nclass CfgRoles\n{\n    class Assault // Class name used in CfgRespawnInventory\n    {\n        displayName = \"$STR_A3_Role_Assault\"; // Name of the role, displayed in the respawn menu\n        icon = \"a3\\missions_f_exp\\data\\img\\classes\\assault_ca.paa\"; // Icon shown next to the role name in the respawn screen\n    };\n};\n\nclass CfgRespawnInventory\n{\n    class B_SquadLeader // Class of the respawn inventory, used by BIS_fnc_addRespawnInventory\n    {\n        displayName = \"$STR_b_soldier_sl_f0\"; // Name of the respawn inventory\n        role = \"Assault\"; // Role the respawn inventory is assigned to\n        icon = \"\\A3\\ui_f\\data\\map\\VehicleIcons\\iconManLeader_ca.paa\"; // Icon shown next to the role\n        show = \"side group _this == west\"; // Condition used to make specific respawn inventories only available for specfic sides, must return [[Boolean]]\n        weapons[] = { // Weapons\n            \"arifle_SPAR_01_khk_F\",\n            \"Rangefinder\",\n            \"hgun_P07_khk_F\"\n        };\n\n        magazines[] = { // Magazines\n            \"SmokeShell\",\n            \"SmokeShell\",\n            \"16Rnd_9x21_Mag\",\n            \"16Rnd_9x21_Mag\",\n            \"16Rnd_9x21_Mag\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"30Rnd_556x45_Stanag_Tracer_Red\",\n            \"HandGrenade\",\n            \"HandGrenade\"\n        };\n\n        items[] = { // Useable items\n            \"FirstAidKit\"\n        };\n\n        linkedItems[] = { // Linked items, also weapon items, helmet etc.\n            \"V_PlateCarrierSpec_tna_F\",\n            \"H_HelmetB_Enh_tna_F\",\n            \"optic_ERCO_blk_F\",\n            \"acc_pointer_IR\",\n            \"NVGoggles_tna_F\",\n            \"ItemGPS\",\n            \"ItemMap\",\n            \"ItemCompass\",\n            \"ItemWatch\",\n            \"ItemRadio\"\n        };\n\n        uniformClass = \"U_B_T_Soldier_SL_F\"; // uniform\n    };\n```\n\n**Export Function**:\n\n- The following function will copy a complete respawn inventory to your clipboard, see function header for more information.\n\n**Author:** R3vo\n\n```sqf\n/*\n    Author: R3vo\n\n    Description:\n    Retrieves loadout of unit and formats it for CfgRespawnLoadouts. Content is copied to clipboard and returned by function.\n\n    Parameter(s):\n    0: Object - Object to take the loadout from\n    1: String - Class name of the respawn loadout\n    2: String - Display name of the respawn loadout\n    3: String - Icon path displayed next to display name\n    4: String - Loadouts are assigned to a role, possible values:\n        \"Assistant\"\n        \"CombatLifeSaver\"\n        \"Crewman\"\n        \"Default\"\n        \"Grenadier\"\n        \"MachineGunner\"\n        \"Marksman\"\n        \"MissileSpecialist\"\n        \"Rifleman\"\n        \"Sapper\"\n        \"SpecialOperative\"\n        \"Unarmed\"\n    5: String - Condition for the respawn loadout to be shown. Code inside string has to return boolean. _this refers to the unit inside the respawn screen\n\n    Returns:\n    String - Exports formatted loadout\n*/\n\nparams\n[\n    [\"_object\", player, [objNull]],\n    [\"_class\", \"REPLACE\", [\"\"]],\n    [\"_displayName\", \"REPLACE\", [\"\"]],\n    [\"_icon\", \"\\A3\\Ui_f\\data\\GUI\\Cfg\\Ranks\\sergeant_gs.paa\", [\"\"]],\n    [\"_role\", \"Default\", [\"\"]],\n    [\"_conditionShow\", \"true\", [\"\"]]\n];\n\nprivate _indent = \"    \";\nprivate _class = format [\"class %1\", _class];\nprivate _displayName = format [\"displayName = \"\"%1\"\";\", _displayName];\nprivate _icon = format [\"icon = \"\"%1\"\";\", _icon];\nprivate _role = format [\"role = \"\"%1\"\";\", _role];\nprivate _conditionShow = format [\"show = \"\"%1\"\";\", _conditionShow];\nprivate _uniformClass = format [\"uniformClass = \"\"%1\"\";\", uniform _object];\nprivate _backpack = format [\"backpack = \"\"%1\"\";\", backpack _object];\nprivate _export = _class + endl + \"{\" + endl + _indent + _displayName + endl + _indent + _icon + endl + _indent + _role + endl + _indent + _conditionShow + endl + _indent + _uniformClass + endl + _indent + _backpack + endl;\nprivate _weapons = weapons _object;\nprivate _primWeaponItems = primaryWeaponItems _object;\nprivate _secWeaponItems = secondaryWeaponItems _object;\nprivate _assignedItems = assignedItems _object;\n// From BIS_fnc_exportLoadout START\nprivate _fnc_addArray =\n{\n    params [\"_name\", \"_array\"];\n    _export = _export + format [_indent + \"%1[] = {\", _name];\n    {\n        if (_foreachindex > 0) then {_export = _export + \", \";};\n        _export = _export + format [\"\"\"%1\"\"\", _x];\n    } foreach _array;\n    _export = _export + \"};\" + endl;\n};\n\n[\"weapons\", _weapons + [\"Throw\", \"Put\"]] call _fnc_addArray;\n[\"magazines\", magazines _object] call _fnc_addArray;\n[\"items\", items _object] call _fnc_addArray;\n[\"linkedItems\", [vest _object, headgear _object, goggles _object] + _assignedItems - _weapons + _primWeaponItems + _secWeaponItems] call _fnc_addArray;\n// From BIS_fnc_exportLoadout END\n_export = _export + \"};\" + endl + \"// visit https://community.bistudio.com/wiki/Arma_3:_Respawn for detailed information\";\n\ncopyToClipboard _export;\n_export;\n```\n\n> [!IMPORTANT]\n> Loadouts are only available after they were added with the BIS_fnc_addRespawnInventory function!"},{"heading":"Restore Loadout on Respawn","level":3,"markdown":""},{"heading":"Respawn with Original Loadout","level":4,"markdown":"In order to let players respawn with the gear with which they started the mission, create an initPlayerLocal.sqf file in the mission directory (if it does not exist already) and add the following code:\n\n`initPlayerLocal.sqf`\n\n```sqf\nplayer setVariable [\"TAG_StartLoadout\", getUnitLoadout player];\nplayer addEventHandler [\"Respawn\", { private _loadout = player getVariable \"TAG_StartLoadout\"; if (!isNil \"_loadout\") then { player setUnitLoadout _loadout; }; }];\n```"},{"heading":"Respawn with Death Loadout","level":4,"markdown":"The following code makes the player respawn with the loadout they had on death:\n\n`initPlayerLocal.sqf`\n\n```sqf\nplayer addEventHandler [\"Killed\", { player setVariable [\"TAG_DeathLoadout\", getUnitLoadout player]; }];\nplayer addEventHandler [\"Respawn\", { private _loadout = player getVariable \"TAG_DeathLoadout\"; if (!isNil \"_loadout\") then { player setUnitLoadout _loadout; }; }];\n```"}],"categories":["Arma 3: Editing"],"groups":["General"]}