Arma 3 Scripting

BIS_fnc_respawnTickets

  • Global effect
  • Arma 3 v0.74

Function · Markdown · JSON · original wiki page

Description

Manage respawn tickets used by Tickets respawn template.

When 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.

When 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.

Syntax

Syntax 1

[target, tickets, dynamicTarget] call BIS_fnc_respawnTickets

Parameters:

Returns: Number - remaining tickets after adjustment

Syntax 2

[] call BIS_fnc_respawnTickets

Returns: Number - remaining tickets in all name spaces

Examples

Example 1

Add 5 tickets for BLUFOR:

[west, 5] call BIS_fnc_respawnTickets;

Example 2

Return number of global tickets:

_globalTickets = [missionNamespace] call BIS_fnc_respawnTickets;

Example 3

Return number of player's tickets:

_playerTickets = [player, nil, true] call BIS_fnc_respawnTickets;

See also

Arma 3: Respawn · BIS_fnc_addRespawnPosition · BIS_fnc_removeRespawnPosition