{"name":"respawnVehicle","operator":null,"title":"respawnVehicle","type":"command","url":"https://community.bistudio.com/wiki/respawnVehicle","revid":370172,"updated":"2024-11-03T21:40:23Z","groups":["Multiplayer"],"status":"ok","replaced_by":[],"games":[{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"global","server_exec":false},"exec":null,"description":"Sets vehicle as respawnable in MP game (see Vehicle Respawn). The vehicle will be spawned at the locality and coordinates it was prior to destruction.\nIf respawn type is set to base respawn (type 3) and vehicle respawn marker is provided (respawn_vehicle_SIDEXXX), vehicle will spawn on the marker. The command must be executed where vehicle is local. If the vehicle is in respawn queue, as long as the vehicle is local it should be possible to update params of the respawning vehicle, i.e change delay, disable respawn, etc.","syntaxes":[{"syntax":"vehicle respawnVehicle [respawnDelay, respawnCount, deleteOldWreck, respawnOnServer, respawnFlying, respawnUnit, respawnMode, respawnSide, useRespawnMarkerDir]","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"transport","types":["Object"],"since":null,"text":"vehicle: Object - transport"},{"name":"respawnDelay","type":"Number","optional":true,"default":"-1","description":"delay in seconds between respawns. (-1 to use 3DEN vehicle respawn delay or *respawnVehicleDelay* from description.ext)","types":["Number"],"since":null,"text":"respawnDelay: Number - (Optional since 2.18, default -1) delay in seconds between respawns. (-1 to use 3DEN vehicle respawn delay or *respawnVehicleDelay* from description.ext)"},{"name":"respawnCount","type":"Number","optional":true,"default":"unlimited respawns","description":"how many times to respawn vehicle in total. (since 2.18 -1 unlimited respawns, 0 stop respawning)","types":["Number"],"since":null,"text":"respawnCount: Number - (Optional, default unlimited respawns) how many times to respawn vehicle in total. (since 2.18 -1 unlimited respawns, 0 stop respawning)"},{"name":"deleteOldWreck","type":"Boolean","optional":true,"default":"false","description":"deletes old wreck automatically after vehicle respawns","types":["Boolean"],"since":"arma3 2.18","text":"deleteOldWreck: Boolean - (Optional, default false) - deletes old wreck automatically after vehicle respawns"},{"name":"respawnOnServer","type":"Boolean","optional":true,"default":"false","description":"wreck is always transferred to the server and the new vehicle always respawns on server","types":["Boolean"],"since":"arma3 2.18","text":"respawnOnServer: Boolean - (Optional, default false) - wreck is always transferred to the server and the new vehicle always respawns on server"},{"name":"respawnFlying","type":"Boolean","optional":true,"default":"false","description":"by default all vehicles placed on the ground, true overrides this","types":["Boolean"],"since":"arma3 2.18","text":"respawnFlying: Boolean - (Optional, default false) - by default all vehicles placed on the ground, true overrides this"},{"name":"respawnUnit","type":"Object","optional":true,"default":"objNull","description":"unit that would be put in the driver seat after vehicle respawns","types":["Object"],"since":"arma3 2.18","text":"respawnUnit: Object - (Optional, default objNull) - unit that would be put in the driver seat after vehicle respawns"},{"name":"respawnMode","type":"Number or String","optional":true,"default":"-1","description":"overrides vehicle respawn mode. Available modes are: 2 or \"INSTANT\" and 3 or \"BASE\". -1 use description.ext value.","types":["Number","String"],"since":"arma3 2.18","text":"respawnMode: Number or String - (Optional, default -1) - overrides vehicle respawn mode. Available modes are: 2 or \"INSTANT\" and 3 or \"BASE\". -1 use description.ext value."},{"name":"respawnSide","type":"Side","optional":true,"default":"typical vehicle side","description":"sets respawn side for the purpouse of selecting respawn marker","types":["Side"],"since":"arma3 2.18","text":"respawnSide: Side - (Optional, default typical vehicle side) - sets respawn side for the purpouse of selecting respawn marker"},{"name":"useRespawnMarkerDir","type":"Boolean","optional":true,"default":"false","description":"respawn vehicle matches respawn marker direction or the old wreck direction. false - random direction.","types":["Boolean"],"since":"arma3 2.18","text":"useRespawnMarkerDir: Boolean - (Optional, default false) - respawn vehicle matches respawn marker direction or the old wreck direction. false - random direction."}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"[respawnDelay, respawnCount, deleteOldWreck, respawnOnServer, respawnFlying, respawnUnit, respawnMode, respawnSide, useRespawnMarkerDir]","types":["Array"]}}],"examples":[{"text":"```sqf\ncar respawnVehicle [5, 3]; // 'car' will respawn at the predefined marker for the side after 5 seconds. The unit will respawn 3 times.\n```","code":["car respawnVehicle [5, 3]; // 'car' will respawn at the predefined marker for the side after 5 seconds. The unit will respawn 3 times."]},{"text":"```sqf\ncar respawnVehicle [30]; // 'car' will respawn at the predefined marker for the side after 30 seconds. The unit will respawn an unlimited number of times.\n```","code":["car respawnVehicle [30]; // 'car' will respawn at the predefined marker for the side after 30 seconds. The unit will respawn an unlimited number of times."]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Vehicle Respawn","getRespawnVehicleInfo","playerRespawnTime","setPlayerRespawnTime"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Introduced with Operation Flashpoint: Elite version 1.00","Operation Flashpoint: Elite: New Scripting Commands","Operation Flashpoint: Elite: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}