respawnVehicle: Difference between revisions

From Bohemia Interactive Community
m (VBS2 scripting category removal)
m (Text replacement - ">Posted on May ([0-9]{2}), ([0-9]{4})" to ">Posted on $2-05-$1")
(48 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|RESPAWNVEHICLE]]
{{RV|type=command
[[Category:Scripting Commands OFP Elite |RESPAWNVEHICLE]]
[[Category:Scripting Commands ArmA|RESPAWNVEHICLE]]


{{Command|= Comments
|game1= ofpe
____________________________________________________________________________________________
|version1= 1.00


| arma |= Game name
|game2= arma1
|version2= 1.00


|1.00|= Game version
|game3= arma2
____________________________________________________________________________________________
|version3= 1.00


| Set vehicle as respawnable in MP games.  |= Description
|game4= arma2oa
____________________________________________________________________________________________
|version4= 1.50


| vehicleName '''respawnVehicle''' [delay <nowiki>=</nowiki> -1, count <nowiki>=</nowiki> 0] |= Syntax
|game5= tkoh
|version5= 1.00


|p1= vehicleName: [[Object]] |= Parameter 1
|game6= arma3
|p2= [delay <nowiki>=</nowiki> -1, count <nowiki>=</nowiki> 0]: [[Array]] |= Parameter 2
|version6= 0.50
|p3= delay: [[Number]]. Default -1 (use '''respawnDelay''' from [[Description.ext]]) |= Parameter 3
|p4= count: [[Number]]. Default 0 (unlimited respawns) |= Parameter 4


| [[Nothing]] |= Return value
|arg= local
____________________________________________________________________________________________
 
|x1= <pre>_car respawnVehicle [5.0, 3];</pre>


'car' will respawn at the predefined marker for the [[side]] after 5 seconds. The unit will respawn 3 times.|= Example 1
|eff= global


|gr1= Multiplayer


|x2= <pre>_car respawnVehicle [30];</pre>
|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_XXXSIDEXXX), vehicle will spawn on the marker.


'car' will respawn at the predefined marker for the [[side]] after 30 seconds. The unit will respawn an unlimited number of times.|= Example 2
|s1= vehicle [[respawnVehicle]] [delay, count]
____________________________________________________________________________________________


| |= See also
|p1= vehicle: [[Object]]


|p2= delay: [[Number]] - delay in seconds between respawns. (-1 to use ''respawnDelay'' from [[Description.ext|description.ext]])
|p3= count: [[Number]] - (Optional, default 0) how many times to respawn vehicle in total. (0 - unlimited respawns)
|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>
|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>
|seealso= [[playerRespawnTime]] [[setPlayerRespawnTime]]
}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
 
For this command to work (in both SP & MP) you need the appropriate markers in the mission.
<dt></dt>
<dd class="notedate">Posted on 2007-05-28 - 16:38 (CEST)</dd>
<dt class="note">[[User:Sy|Sy]]</dt>
<dd class="note">
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.
[[User:Sy|Sy]] 16:38, 28 May 2007 (CEST)


----
----


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.
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.--[[User:Sy|Sy]] 16:49, 10 June 2007 (CEST)
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>
<!-- Note Section END -->
 
</dl>
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]

Revision as of 23:00, 13 May 2023

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_XXXSIDEXXX), vehicle will spawn on the marker.
Groups:
Multiplayer

Syntax

Syntax:
vehicle respawnVehicle [delay, count]
Parameters:
vehicle: Object
delay: Number - delay in seconds between respawns. (-1 to use respawnDelay from description.ext)
count: Number - (Optional, default 0) how many times to respawn vehicle in total. (0 - unlimited respawns)
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:
playerRespawnTime setPlayerRespawnTime

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
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.