respawnVehicle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
No edit summary
 
(47 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= ofpe
|version1= 1.00


|1.00|Game version=
|game2= arma1
|version2= 1.00


|arg= local |Multiplayer Arguments=
|game3= arma2
|version3= 1.00


|eff= global |Multiplayer Effects=
|game4= arma2oa
____________________________________________________________________________________________
|version4= 1.50


| Sets vehicle as respawnable in MP game. 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_XXXSIDEXXX), vehicle will spawn on the marker. <br><br>
|game5= tkoh
|version5= 1.00


{{Informative | Command has to be executed where vehicle is [[local]] }}|DESCRIPTION=
|game6= arma3
____________________________________________________________________________________________
|version6= 0.50


| vehicle '''respawnVehicle''' [delay, count] |SYNTAX=
|arg= local


|p1= vehicle: [[Object]] |PARAMETER1=
|eff= global
|p2= [delay, count]: [[Array]] |PARAMETER2=
|p3= delay: [[Number]] - Delay in seconds between respawns. (-1 to use ''respawnDelay'' from [[description.ext]]) |PARAMETER3=
|p4= count: [[Number]] (Optional) - How many times to respawn vehicle in total. (0 - unlimited respawns) |PARAMETER4=


| [[Nothing]] |RETURNVALUE=
|gr1= Multiplayer
____________________________________________________________________________________________
 
|x1= <code>car [[respawnVehicle]] [5, 3];</code>


'car' will respawn at the predefined marker for the [[side]] after 5 seconds. The unit will respawn 3 times.|EXAMPLE1=
|descr= Sets vehicle as respawnable in MP game. 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.


|s1= vehicle [[respawnVehicle]] [respawnDelay, respawnCount, deleteOldWreck, respawnOnServer, respawnFlying, respawnUnit, respawnMode, respawnSide, useRespawnMarkerDir]


|x2= <code>car [[respawnVehicle]] [30];</code>
|p1= vehicle: [[Object]] - transport


'car' will respawn at the predefined marker for the [[side]] after 30 seconds. The unit will respawn an unlimited number of times.|EXAMPLE2=
|p2= 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|description.ext]])
____________________________________________________________________________________________


| [[playerRespawnTime]], [[setPlayerRespawnTime]] |SEEALSO=
|p3= respawnCount: [[Number]] - (Optional, default unlimited respawns) how many times to respawn vehicle in total. (since 2.18 -1 unlimited respawns, 0 stop respawning)


}}
|p4= deleteOldWreck: [[Boolean]] - (Optional, default [[false]]) - deletes old wreck automatically after vehicle respawns
|p4since= arma3 2.18
|p5= respawnOnServer: [[Boolean]] - (Optional, default [[false]]) - wreck is always transferred to the server and the new vehicle always respawns on server
|p5since= arma3 2.18
|p6= respawnFlying: [[Boolean]] - (Optional, default [[false]]) - by default all vehicles placed on the ground, [[true]] overrides this
|p6since= arma3 2.18
|p7= respawnUnit: [[Object]] - (Optional, default [[objNull]]) - unit that would be put in the driver seat after vehicle respawns
|p7since= arma3 2.18
|p8= 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|description.ext]] value.
|p8since= arma3 2.18
|p9= respawnSide: [[Side]] - (Optional, default typical vehicle [[side]]) - sets respawn side for the purpouse of selecting respawn marker
|p9since= arma3 2.18
|p10= useRespawnMarkerDir: [[Boolean]] - (Optional, default [[false]]) - respawn vehicle matches respawn marker direction or the old wreck direction. [[false]] - random direction.
|p10since= arma3 2.18


<h3 style="display:none">Notes</h3>
|r1= [[Nothing]]


|x1= <sqf>car respawnVehicle [5, 3]; // 'car' will respawn at the predefined marker for the side after 5 seconds. The unit will respawn 3 times.</sqf>


<h3 style="display:none">Bottom Section</h3>
|x2= <sqf>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.</sqf>
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
|seealso= [[getRespawnVehicleInfo]] [[playerRespawnTime]] [[setPlayerRespawnTime]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Command_Group:_Multiplayer|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|RESPAWNVEHICLE]]
[[Category:Scripting Commands OFP Elite |RESPAWNVEHICLE]]
[[Category:Scripting Commands ArmA|RESPAWNVEHICLE]]


<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dd class="notedate">Posted on May 28, 2007 - 16:38 (CEST)</dd>
 
<dt></dt>
<dd class="notedate">Posted on 2007-05-28 - 16:38 (CEST)</dd>
<dt class="note">[[User:Sy|Sy]]</dt>
<dt class="note">[[User:Sy|Sy]]</dt>
<dd class="note">
<dd class="note">
For this command to work (in MP) you need the appropriate markers in the mission.
For this command to work (in MP) you need the appropriate markers in the mission.
The markers are...
The markers are...
<pre>respawn_vehicle_west
* "respawn_vehicle_west"
respawn_vehicle_east
* "respawn_vehicle_east"
respawn_vehicle_guerilla
* "respawn_vehicle_guerilla"
respawn_vehicle_civilian
* "respawn_vehicle_civilian"
</pre>
</pre>


Also, by default it will use respawnDelay from the description.ext as mentioned unless you specify
Also, by default it will use respawnDelay from the description.ext as mentioned unless you specify
<pre>respawnVehicleDelay = x;</pre>
<syntaxhighlight lang="cpp">respawnVehicleDelay = x;</syntaxhighlight>
Where x is delay in seconds.
Where x is delay in seconds.


Line 74: Line 83:
If the vehicle has yet to be driven or the AI driver is local to the Server then the respawned vehicle will be local to the Server.
If the vehicle has yet to be driven or the AI driver is local to the Server then the respawned vehicle will be local to the Server.
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 01:31, 6 March 2024

Hover & click on the images for description

Description

Description:
Sets vehicle as respawnable in MP game. 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.
Groups:
Multiplayer

Syntax

Syntax:
vehicle respawnVehicle [respawnDelay, respawnCount, deleteOldWreck, respawnOnServer, respawnFlying, respawnUnit, respawnMode, respawnSide, useRespawnMarkerDir]
Parameters:
vehicle: Object - transport
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)
respawnCount: Number - (Optional, default unlimited respawns) how many times to respawn vehicle in total. (since 2.18 -1 unlimited respawns, 0 stop respawning)
since Arma 3 logo black.png2.18
deleteOldWreck: Boolean - (Optional, default false) - deletes old wreck automatically after vehicle respawns
since Arma 3 logo black.png2.18
respawnOnServer: Boolean - (Optional, default false) - wreck is always transferred to the server and the new vehicle always respawns on server
since Arma 3 logo black.png2.18
respawnFlying: Boolean - (Optional, default false) - by default all vehicles placed on the ground, true overrides this
since Arma 3 logo black.png2.18
respawnUnit: Object - (Optional, default objNull) - unit that would be put in the driver seat after vehicle respawns
since Arma 3 logo black.png2.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 Arma 3 logo black.png2.18
respawnSide: Side - (Optional, default typical vehicle side) - sets respawn side for the purpouse of selecting respawn marker
since Arma 3 logo black.png2.18
useRespawnMarkerDir: Boolean - (Optional, default false) - respawn vehicle matches respawn marker direction or the old wreck direction. false - random direction.
Return Value:
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.

Additional Information

See also:
getRespawnVehicleInfo playerRespawnTime setPlayerRespawnTime

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on 2007-05-28 - 16:38 (CEST)
Sy
For this command to work (in MP) you need the appropriate markers in the mission. The markers are...
  • "respawn_vehicle_west"
  • "respawn_vehicle_east"
  • "respawn_vehicle_guerilla"
  • "respawn_vehicle_civilian"

Also, by default it will use respawnDelay from the description.ext as mentioned unless you specify

respawnVehicleDelay = x;

Where x is delay in seconds.


In Multiplayer the respawned vehicle remains local to the client who was the last driver of the vehicle or the client who was the leader of the last AI driver of the vehicle. If the vehicle has yet to be driven or the AI driver is local to the Server then the respawned vehicle will be local to the Server.