Arma 3 Scripting

BIS_fnc_addRespawnPosition

  • Global effect
  • Arma 3 v0.50

Function · Markdown · JSON · original wiki page

Description

Add a respawn position for the Arma 3 Respawn Menu.

Syntax

[target, position, name] call BIS_fnc_addRespawnPosition

Parameters:

Returns: Array - format [target,id] (used in BIS_fnc_removeRespawnPosition)

Examples

Example 1

[west, myRespawnAPC] call BIS_fnc_addRespawnPosition;

Example 2

myRespawn = [missionNamespace,"arena","Battle Arena"] call BIS_fnc_addRespawnPosition;

See also

BIS_fnc_removeRespawnPosition · Arma 3: Respawn · BIS_fnc_respawnTickets

Community notes

Krzmbrzl00

Make sure the used Position is in format Position3D (i.e. it contains a third coordinate (z-coordinate)) because otherwise you will get an error as soon as you open the respawn screen and you will be respawned at position [0,0,0] (lower left corner of the map), although the map marker for the spawn position is placed as intended

Leopard20

As of Arma 3 Arma 3 v2.10, when you use an object as the respawn position on water (e.g. on a carrier), the respawn position is incorrect. Instead, just pass the ATL position. For example, if you intend to add a respawn position in Eden Editor, instead of the respawn position module, place a dummy object such as User Texture (1m) (class UserTexture1m_F) and paste this in its init:

if (isServer) then {
    [BLUFOR, getPosATL this, "My West Respawn"] call BIS_fnc_addRespawnPosition;
    deleteVehicle this;
}

This code adds a respawn position at the position of the dummy object, and deletes the dummy object afterwards.