BIS fnc respawnTickets: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - "\[\[Arma 3 ([^ACHJKLMTZ|])([^|]+)\]\]" to "Arma 3: $1$2")
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function


| arma3 |Game name=
| arma3


|0.74|Game version=
|0.74


|gr1= Respawn |GROUP1=
|gr1= Respawn


|eff= global |MPeff=
|eff= global


| Manage respawn tickets used by ''[[Arma_3_Respawn#Respawn_Templates|Tickets]]'' respawn template.
| Manage respawn tickets used by ''[[Arma_3_Respawn#Respawn_Templates|Tickets]]'' respawn template.
Line 14: Line 14:


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.
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.
|DESCRIPTION=


| [<target>,(<tickets>,<dynamicTarget>)] call [[BIS_fnc_respawnTickets]]; |SYNTAX=
| [<target>,(<tickets>,<dynamicTarget>)] call [[BIS_fnc_respawnTickets]];


|p1= '''target''': Receiver of the respawn tickets
|p1= '''target''': Receiver of the respawn tickets
Line 22: Line 21:
: [[Side]]
: [[Side]]
: [[Group]]
: [[Group]]
: [[Object]]|Parameter1=
: [[Object]]
|p2= '''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.
|p2= '''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.
|p3= '''dynamicTarget''': [[Boolean]] - when [[true]], set/get tickets based on the target. '''target''' must be an [[Object]].
|p3= '''dynamicTarget''': [[Boolean]] - when [[true]], set/get tickets based on the target. '''target''' must be an [[Object]].


| [[Number]] - remaining tickets after adjustment |RETURNVALUE=
| [[Number]] - remaining tickets after adjustment


|s2= [] [[call]] [[BIS_fnc_respawnTickets]]; |SYNTAX2=
|s2= [] [[call]] [[BIS_fnc_respawnTickets]];


|r2= [[Number]] - remaining tickets in all name spaces |RETURNVALUE2=
|r2= [[Number]] - remaining tickets in all name spaces
   
   
|x1= Add 5 tickets for BLUFOR
|x1= Add 5 tickets for BLUFOR
<code><nowiki>[</nowiki>[[west]], 5] [[call]] [[BIS_fnc_respawnTickets]];</code> |Example1=
<code><nowiki>[</nowiki>[[west]], 5] [[call]] [[BIS_fnc_respawnTickets]];</code>


|x2= Return number of global tickets
|x2= Return number of global tickets
<code>globalTickets = [<nowiki/>[[missionNamespace]]] [[call]] [[BIS_fnc_respawnTickets]];</code> |Example2=
<code>globalTickets = [<nowiki/>[[missionNamespace]]] [[call]] [[BIS_fnc_respawnTickets]];</code>


|x3= Return number of player's tickets
|x3= Return number of player's tickets
<code><nowiki>playerTickets = [</nowiki>[[player]],[[nil]],[[true]]] [[call]] [[BIS_fnc_respawnTickets]];</code> |=
<code><nowiki>playerTickets = [</nowiki>[[player]],[[nil]],[[true]]] [[call]] [[BIS_fnc_respawnTickets]];</code>
 
| [[Arma 3 Respawn]], [[BIS_fnc_addRespawnPosition]], [[BIS_fnc_removeRespawnPosition]] |SEEALSO=


|seealso= [[Arma 3: Respawn]], [[BIS_fnc_addRespawnPosition]], [[BIS_fnc_removeRespawnPosition]]
}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>


[[Category:Functions|{{uc:respawnTickets}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:respawnTickets}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:respawnTickets}}]]

Revision as of 20:28, 7 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Respawn

Syntax

Syntax:
Syntax needed
Parameters:
target: Receiver of the respawn tickets
Namespace - use missionNamespace to set/get global tickets available for everyone
Side
Group
Object
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.
dynamicTarget: Boolean - when true, set/get tickets based on the target. target must be an Object.
Return Value:
Return value needed

Alternative Syntax

Syntax:
[] call BIS_fnc_respawnTickets;
Return Value:
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;

Additional Information

See also:
Arma 3: RespawnBIS_fnc_addRespawnPositionBIS_fnc_removeRespawnPosition

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note