{"name":"Vehicle Respawn","title":"Vehicle Respawn","type":"topic","url":"https://community.bistudio.com/wiki/Vehicle_Respawn","revid":373037,"updated":"2025-03-20T14:09:20Z","aliases":[],"markdown":"Arma 3 v2.18\n\nArma 3 v2.18 improved and extended the vehicle respawn functionality. The new options can be found on respawnVehicle and getRespawnVehicleInfo pages.\n\n#### Description.ext\n\n> [!IMPORTANT]\n> Any mode set for vehicle that is invalid (e.g 4/\"GROUP\") will be treated as 0/\"NONE\".\n\n| Respawn Type |  | Available To |  |\n|---|---|---|---|\n| Number | String | Character | Vehicle |\n| 0 | \"NONE\" | ✓ | ✓ |\n| 1 | \"BIRD\" | ✓ | ✗ |\n| 2 | \"INSTANT\" | ✓ | ✓ |\n| 3 | \"BASE\" | ✓ | ✓ |\n| 4 | \"GROUP\" | ✓ | ✗ |\n| 5 | \"SIDE\" | ✓ | ✗ |\n\nThe 'respawn' mode parameter is applied to both units and vehicles. Since Arma 3 v2.18 there is a new respawnVehicle parameter that can set individual respawn mode for vehicles:\n\n| Before Arma 3 v2.18 | Since Arma 3 v2.18 |\n|---|---|\n| ```cpp<br>respawn = 3;                // sets respawn mode for units and vehicles<br>respawnDelay = 8;            // sets respawn delay for units<br><br>respawnVehicleDelay = 30;    // sets respawn delay for vehicles<br>``` | ```cpp<br>respawn = 3;                // sets respawn mode for units<br>respawnDelay = 8;            // sets respawn delay for units<br>// if 'respawnVehicle' is not set, 'respawn' is used for vehicles<br>respawnVehicle = 2;            // sets respawn mode for vehicles<br>respawnVehicleDelay = 30;    // sets respawn delay for vehicles<br>``` |\n\n#### 3den Editor\n\nThere are 6 respawn options in the 3DEN in Multiplayer options:\n\n- Disabled - same as \"NONE\" or 0\n- Respawn on Custom Position - same as \"BASE\" or 3\n- Resapwn on Position Of Death - same as \"INSTANT\" or 2\n- Switch to Group Member - same as \"GROUP\" or 4\n- Switch to Side Member - same as \"SIDE\" or 5\n- Switch to Spectator - same as \"BIRD\" or 1\n\nThis option is mirroring 'respawn' from description.ext. Only Disabled, Respawn on Custom Position and Resapwn on Position Of Death apply to vehicles.\nThere is no separate option for individual vehicle respawn mode, which is currently available in description.ext and via script command only.\n\nOther parameters are:\n\n- Respawn Delay - same as 'respawnDelay' from description.ext\n- Vehicle Respawn Delay - same as 'respawnVehicleDelay' from description.ext\n\nThe description.ext respawn params take priority over 3DEN respawn params.\n\n#### Script\n\nThe vehicle respawn params can be set via respawnVehicle and read via getRespawnVehicleInfo. The script commands also provide additional options not available otherwise.\n\nIn addition to setting respawn mode and delay, it is possible to set:\n\n- a finite number of respawns for a vehicle\n- whether or not the old wreck should be deleted when new vehicle respawns (wreck left behind gets the `_oldwreck` suffix in vehicleVarName for it)\n- force vehicle to spawn on the server (by default vehicle will spawn on the client it was destroyed)\n- whether or not the vehicle respawns in the air\n- the respawn unit\n- the respawn side\n- whether or not the respawned vehicle uses marker direction\n\nThe vehicle respawn is handled at the client where vehicle was destroyed. If client leaves the server, the vehicle respawn will be transferred to the server.\nVehicle placed in editor will also spawn on the server for the very first time.\n\nrespawnVehicle now has an option to force vehicle respawn on the server regardless, which should make it easier to use respawnVehicle command as it requires vehicle to be local.\nWhen vehicle respawn is \"BASE\", the moment a vehicle is destroyed, a respawn marker for it is chosen, which could be returned with getRespawnVehicleInfo. This is the process of selecting such marker:\n\n1. vehicle specific side specific: search for all markers that prefix with \"respawn_<vehicleVarName>_<side>\", for example \"respawn_car1_west_1\". If several are found, a random one is chosen\n1. vehicle specific: search for all markers that prefix with \"respawn_<vehicleVarName>\", for example \"respawn_car1_123\". If several are found, a random one is chosen\n1. vehicle general side specific: search for all markers that prefix with \"respawn_vehicle_<side>\", for example \"respawn_vehicle_east_FOREST\". If several are found, a random one is chosen\n1. vehicle general: search for all markers that prefix with \"respawn_vehicle\", for example \"respawn_vehicle_garage\". If several are found, a random one is chosen\n1. any respawn marker: search for all markers that prefix with \"respawn\", for example \"respawn_left1\". If several are found, a random one is chosen\n1. if no markers found, the wreck position and direction is used.\n\nWhen a marker is found, the respawn position is chosen randomly within the marker. If the marker is Icon, or the size of the marker is 0, the position is marker position.\nIf the marker is Ellipse or Rectangular, the position is chosed randomly within its area.\nVehicle direction is chosen randomly unless specified to take direction of the marker with respawnVehicle.\nAlternatively, the respawn position can be passed as return value in the vehicle's Respawn event handler.\nBy default all vehicles are respawned on the ground even if position's height is above the ground.\nrespawnVehicle has an option to respawn in the air.\n\nMany respawn params can be ajusted on the fly while the vehicle is in respawn queue, but the vehicle has to be local for this to have an effect.\n\nVehicle specific side specific marker could be used to have the same named vehicle spawn on enemy or friendly side, depending on the respawn side param set with respawnVehicle command.\nIf there are 2 markers \"respawn_car1_west\", \"respawn_car1_east\", car1 will respawn on the marker that matches respawn side set after vehicle entered into repsawn queue.\nFor example one could make a scenario where enemy vehicles could get commandeered and on the next respawn appear on friendly side.","sections":[{"heading":null,"level":1,"markdown":"Arma 3 v2.18\n\nArma 3 v2.18 improved and extended the vehicle respawn functionality. The new options can be found on respawnVehicle and getRespawnVehicleInfo pages."},{"heading":"Description.ext","level":4,"markdown":"> [!IMPORTANT]\n> Any mode set for vehicle that is invalid (e.g 4/\"GROUP\") will be treated as 0/\"NONE\".\n\n| Respawn Type |  | Available To |  |\n|---|---|---|---|\n| Number | String | Character | Vehicle |\n| 0 | \"NONE\" | ✓ | ✓ |\n| 1 | \"BIRD\" | ✓ | ✗ |\n| 2 | \"INSTANT\" | ✓ | ✓ |\n| 3 | \"BASE\" | ✓ | ✓ |\n| 4 | \"GROUP\" | ✓ | ✗ |\n| 5 | \"SIDE\" | ✓ | ✗ |\n\nThe 'respawn' mode parameter is applied to both units and vehicles. Since Arma 3 v2.18 there is a new respawnVehicle parameter that can set individual respawn mode for vehicles:\n\n| Before Arma 3 v2.18 | Since Arma 3 v2.18 |\n|---|---|\n| ```cpp<br>respawn = 3;                // sets respawn mode for units and vehicles<br>respawnDelay = 8;            // sets respawn delay for units<br><br>respawnVehicleDelay = 30;    // sets respawn delay for vehicles<br>``` | ```cpp<br>respawn = 3;                // sets respawn mode for units<br>respawnDelay = 8;            // sets respawn delay for units<br>// if 'respawnVehicle' is not set, 'respawn' is used for vehicles<br>respawnVehicle = 2;            // sets respawn mode for vehicles<br>respawnVehicleDelay = 30;    // sets respawn delay for vehicles<br>``` |"},{"heading":"3den Editor","level":4,"markdown":"There are 6 respawn options in the 3DEN in Multiplayer options:\n\n- Disabled - same as \"NONE\" or 0\n- Respawn on Custom Position - same as \"BASE\" or 3\n- Resapwn on Position Of Death - same as \"INSTANT\" or 2\n- Switch to Group Member - same as \"GROUP\" or 4\n- Switch to Side Member - same as \"SIDE\" or 5\n- Switch to Spectator - same as \"BIRD\" or 1\n\nThis option is mirroring 'respawn' from description.ext. Only Disabled, Respawn on Custom Position and Resapwn on Position Of Death apply to vehicles.\nThere is no separate option for individual vehicle respawn mode, which is currently available in description.ext and via script command only.\n\nOther parameters are:\n\n- Respawn Delay - same as 'respawnDelay' from description.ext\n- Vehicle Respawn Delay - same as 'respawnVehicleDelay' from description.ext\n\nThe description.ext respawn params take priority over 3DEN respawn params."},{"heading":"Script","level":4,"markdown":"The vehicle respawn params can be set via respawnVehicle and read via getRespawnVehicleInfo. The script commands also provide additional options not available otherwise.\n\nIn addition to setting respawn mode and delay, it is possible to set:\n\n- a finite number of respawns for a vehicle\n- whether or not the old wreck should be deleted when new vehicle respawns (wreck left behind gets the `_oldwreck` suffix in vehicleVarName for it)\n- force vehicle to spawn on the server (by default vehicle will spawn on the client it was destroyed)\n- whether or not the vehicle respawns in the air\n- the respawn unit\n- the respawn side\n- whether or not the respawned vehicle uses marker direction\n\nThe vehicle respawn is handled at the client where vehicle was destroyed. If client leaves the server, the vehicle respawn will be transferred to the server.\nVehicle placed in editor will also spawn on the server for the very first time.\n\nrespawnVehicle now has an option to force vehicle respawn on the server regardless, which should make it easier to use respawnVehicle command as it requires vehicle to be local.\nWhen vehicle respawn is \"BASE\", the moment a vehicle is destroyed, a respawn marker for it is chosen, which could be returned with getRespawnVehicleInfo. This is the process of selecting such marker:\n\n1. vehicle specific side specific: search for all markers that prefix with \"respawn_<vehicleVarName>_<side>\", for example \"respawn_car1_west_1\". If several are found, a random one is chosen\n1. vehicle specific: search for all markers that prefix with \"respawn_<vehicleVarName>\", for example \"respawn_car1_123\". If several are found, a random one is chosen\n1. vehicle general side specific: search for all markers that prefix with \"respawn_vehicle_<side>\", for example \"respawn_vehicle_east_FOREST\". If several are found, a random one is chosen\n1. vehicle general: search for all markers that prefix with \"respawn_vehicle\", for example \"respawn_vehicle_garage\". If several are found, a random one is chosen\n1. any respawn marker: search for all markers that prefix with \"respawn\", for example \"respawn_left1\". If several are found, a random one is chosen\n1. if no markers found, the wreck position and direction is used.\n\nWhen a marker is found, the respawn position is chosen randomly within the marker. If the marker is Icon, or the size of the marker is 0, the position is marker position.\nIf the marker is Ellipse or Rectangular, the position is chosed randomly within its area.\nVehicle direction is chosen randomly unless specified to take direction of the marker with respawnVehicle.\nAlternatively, the respawn position can be passed as return value in the vehicle's Respawn event handler.\nBy default all vehicles are respawned on the ground even if position's height is above the ground.\nrespawnVehicle has an option to respawn in the air.\n\nMany respawn params can be ajusted on the fly while the vehicle is in respawn queue, but the vehicle has to be local for this to have an effect.\n\nVehicle specific side specific marker could be used to have the same named vehicle spawn on enemy or friendly side, depending on the respawn side param set with respawnVehicle command.\nIf there are 2 markers \"respawn_car1_west\", \"respawn_car1_east\", car1 will respawn on the marker that matches respawn side set after vehicle entered into repsawn queue.\nFor example one could make a scenario where enemy vehicles could get commandeered and on the next respawn appear on friendly side."}],"categories":["Arma 3: Editing"],"groups":["General"]}