{"name":"BIS_fnc_respawnTickets","operator":null,"title":"BIS fnc respawnTickets","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_respawnTickets","revid":364273,"updated":"2024-05-06T09:38:31Z","groups":["Respawn"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.74"}],"since":{"game":"arma3","name":"Arma 3","version":"0.74"},"arma3_since":"0.74","branch":null,"locality":{"argument":null,"effect":"global","server_exec":false},"exec":null,"description":"Manage respawn tickets used by Tickets respawn template.\n\nWhen player dies, number of tickets is decreased by 1. The most local tickets are always used. Example: When you first add tickets to player's side, they will be affected. If you later define tickets also to player's group, they will completely replace the side tickets.\n\nWhen player runs out of the tickets, his respawn is disabled. If you use also *EndMission* respawn template, the mission will automatically end once tickets in all name spaces are exhausted.","syntaxes":[{"syntax":"[target, tickets, dynamicTarget] call BIS_fnc_respawnTickets","since":null,"effect":null,"exec":null,"params":[{"name":"target","type":null,"optional":false,"default":null,"description":"Receiver of the respawn tickets. Can be of type:\n- Namespace - use missionNamespace to set/get global tickets available for everyone\n- Side\n- Group\n- Object","types":[],"since":null,"text":"**target**: Receiver of the respawn tickets. Can be of type:\n- Namespace - use missionNamespace to set/get global tickets available for everyone\n- Side\n- Group\n- Object"},{"name":"tickets","type":"Number","optional":false,"default":null,"description":"added respawn tickets. When missing or set to 0, number of tickets won't be affected, which means you can use the function to simply get amount of tickets.","types":["Number"],"since":null,"text":"**tickets**: Number - added respawn tickets. When missing or set to 0, number of tickets won't be affected, which means you can use the function to simply get amount of tickets."},{"name":"dynamicTarget","type":"Boolean","optional":false,"default":null,"description":"when true, set/get tickets based on the target. **target** must be an Object.","types":["Boolean"],"since":null,"text":"**dynamicTarget**: Boolean - when true, set/get tickets based on the target. **target** must be an Object."}],"returns":{"type":"Number","types":["Number"],"description":"remaining tickets after adjustment","text":"Number - remaining tickets after adjustment"}},{"syntax":"[] call BIS_fnc_respawnTickets","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Number","types":["Number"],"description":"remaining tickets in all name spaces","text":"Number - remaining tickets in all name spaces"}}],"examples":[{"text":"Add 5 tickets for BLUFOR:\n\n```sqf\n[west, 5] call BIS_fnc_respawnTickets;\n```","code":["[west, 5] call BIS_fnc_respawnTickets;"]},{"text":"Return number of global tickets:\n\n```sqf\n_globalTickets = [missionNamespace] call BIS_fnc_respawnTickets;\n```","code":["_globalTickets = [missionNamespace] call BIS_fnc_respawnTickets;"]},{"text":"Return number of player's tickets:\n\n```sqf\n_playerTickets = [player, nil, true] call BIS_fnc_respawnTickets;\n```","code":["_playerTickets = [player, nil, true] call BIS_fnc_respawnTickets;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Arma 3: Respawn","BIS_fnc_addRespawnPosition","BIS_fnc_removeRespawnPosition"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Respawn","Functions","Functions: Global Effect","Introduced with Arma 3 version 0.74"],"docblock":null,"filled_from_docblock":[]}