respawnVehicle
- Local argument
- Global effect
- Arma 3 v0.50
- First in Operation Flashpoint: Elite v1.00
Command · Markdown · JSON · original wiki page
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. If 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.
Syntax
vehicle respawnVehicle [respawnDelay, respawnCount, deleteOldWreck, respawnOnServer, respawnFlying, respawnUnit, respawnMode, respawnSide, useRespawnMarkerDir]
Parameters:
vehicle: Object - transportrespawnDelay: Number - (Optional since 2.18, default -1) delay in seconds between respawns. (-1 to use 3DEN vehicle respawn delay or respawnVehicleDelay from description.ext)respawnCount: Number - (Optional, default unlimited respawns) how many times to respawn vehicle in total. (since 2.18 -1 unlimited respawns, 0 stop respawning)deleteOldWreck: Boolean - (Optional, default false) - deletes old wreck automatically after vehicle respawns (since arma3 2.18)respawnOnServer: Boolean - (Optional, default false) - wreck is always transferred to the server and the new vehicle always respawns on server (since arma3 2.18)respawnFlying: Boolean - (Optional, default false) - by default all vehicles placed on the ground, true overrides this (since arma3 2.18)respawnUnit: Object - (Optional, default objNull) - unit that would be put in the driver seat after vehicle respawns (since arma3 2.18)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. (since arma3 2.18)respawnSide: Side - (Optional, default typical vehicle side) - sets respawn side for the purpouse of selecting respawn marker (since arma3 2.18)useRespawnMarkerDir: Boolean - (Optional, default false) - respawn vehicle matches respawn marker direction or the old wreck direction. false - random direction. (since arma3 2.18)
Returns: Nothing
Examples
Example 1
car respawnVehicle [5, 3]; // 'car' will respawn at the predefined marker for the side after 5 seconds. The unit will respawn 3 times.
Example 2
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.
See also
Vehicle Respawn · getRespawnVehicleInfo · playerRespawnTime · setPlayerRespawnTime