{"name":"BIS_fnc_addRespawnPosition","operator":null,"title":"BIS fnc addRespawnPosition","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_addRespawnPosition","revid":342243,"updated":"2023-07-09T12:29:53Z","groups":["Respawn"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":"global","server_exec":false},"exec":null,"description":"Add a respawn position for the Arma 3 Respawn Menu.","syntaxes":[{"syntax":"[target, position, name] call BIS_fnc_addRespawnPosition","since":null,"effect":null,"exec":null,"params":[{"name":"target","type":"Namespace, Side, Group or Object","optional":false,"default":null,"description":"receiver of the respawn position. Use missionNamespace to add the position to everyone","types":["Namespace","Side","Group","Object"],"since":null,"text":"**target**: Namespace, Side, Group or Object - receiver of the respawn position. Use missionNamespace to add the position to everyone"},{"name":"position","type":"Array, Object or String","optional":false,"default":null,"description":"Array, Object or String\n- Array - format PositionATL\n- Object - specific object. When some crew positions are available and unlocked, players will be respawned on them, otherwise they will appear around the object.\n- String - marker name","types":["Array","Object","String"],"since":null,"text":"**position**: Array, Object or String\n- Array - format PositionATL\n- Object - specific object. When some crew positions are available and unlocked, players will be respawned on them, otherwise they will appear around the object.\n- String - marker name"},{"name":"name","type":"String","optional":true,"default":null,"description":"respawn name, can be text or link to localization key","types":["String"],"since":null,"text":"**name**: String - (Optional) respawn name, can be text or link to localization key"}],"returns":{"type":"Array","types":["Array"],"description":"format [target,id] (used in BIS_fnc_removeRespawnPosition)","text":"Array - format [target,id] (used in BIS_fnc_removeRespawnPosition)"}}],"examples":[{"text":"```sqf\n[west, myRespawnAPC] call BIS_fnc_addRespawnPosition;\n```","code":["[west, myRespawnAPC] call BIS_fnc_addRespawnPosition;"]},{"text":"```sqf\nmyRespawn = [missionNamespace,\"arena\",\"Battle Arena\"] call BIS_fnc_addRespawnPosition;\n```","code":["myRespawn = [missionNamespace,\"arena\",\"Battle Arena\"] call BIS_fnc_addRespawnPosition;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_removeRespawnPosition","Arma 3: Respawn","BIS_fnc_respawnTickets"],"notes":[{"user":"Krzmbrzl00","date":"2016-06-01T11:22:00Z","text":"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"},{"user":"Leopard20","date":"2022-07-08T17:38:14Z","text":"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:\n\n```sqf\nif (isServer) then {\n    [BLUFOR, getPosATL this, \"My West Respawn\"] call BIS_fnc_addRespawnPosition;\n    deleteVehicle this;\n}\n```\n\nThis code adds a respawn position at the position of the dummy object, and deletes the dummy object afterwards."}],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Respawn","Functions","Functions: Global Effect","Introduced with Arma 3 version 0.50"],"docblock":null,"filled_from_docblock":[]}