BIS fnc bleedTickets: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "(\|p[0-9]+ *= *[^(]+\(Optional(, default[^)]*)\) )D([a-z])" to "$1d$3")
 
(43 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.10


| arma3 |= Game name
|gr1= Missions


|1.00|= Game version
|descr= Function that handles bleeding ticket system. Tickets are set beforehand using [[BIS_fnc_respawnTickets]].
____________________________________________________________________________________________


| <pre>/*
|mp= Server-side execution only.


Description:
|s1= [sides, dominanceRatio, bleedingAmount, bleedingDelay] call [[BIS_fnc_bleedTickets]]
Initialize ticket bleeding. Works with sector modules.
When a side holds majority of sectors, other non-friendly sides will start losing respawn tickets (set by BIS_fnc_respawnTickets)


"dominantSideChanged" scripted event handler (see BIS_fnc_addScriptedEventHandler) is called every time the dominant side changes.
|p1= sides: [[Array]] - (Optional, default All sides) array of effected sides


Parameter(s):
|p2= dominanceRatio: [[Number]] - (Optional, default 0.5) dominance ratio, values from 0 to 1. Determines how much of a sector a side must hold for bleeding tickets to start
0 (Optional): ARRAY of SIDEs - involved sides. Setting empty array will terminate ticket bleeding (default: all sides)
1 (Optional): NUMBER - dominance ratio in range 0-1, i.e., how large portion of sectors must a side hold for others to start bleeding (default: 0.5)
2 (Optional): NUMBER - how many tickets will be bled every step during full dominance (default: 3)
3 (Optional): NUMBER - delay in seconds between every bleeding step (default: 5)


Returns:
|p3= bleedingAmount: [[Number]] - (Optional, default 3) amount of tickets bled every step. Optional parameter
BOOL
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p4= bleedingDelay: [[Object]] - (Optional, default 5) delay in seconds between every bleeding step
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_bleedTickets]]; --> |= Syntax
|r1= [[Boolean]]


|p1= |= Parameter 1
|x1= <sqf>call BIS_fnc_bleedTickets;</sqf>


| |= Return value
|x2= <sqf>[[west, east], 1, 1, 10] call BIS_fnc_bleedTickets;</sqf>
____________________________________________________________________________________________


|x1= <code></code> |=
|seealso= [[BIS_fnc_addScriptedEventHandler]] [[BIS_fnc_respawnTickets]]
____________________________________________________________________________________________
}}
 
| |= See also


{{Note
|user= Tryteyker-
|timestamp= 20140929195800
|text= The function calls on the scripted eventhandler (see [[BIS_fnc_addScriptedEventHandler]]) "dominantSideChanged" everytime a sector changes dominant side (this again depending on the value given to the function).
}}
}}
<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:Function Group: Systems|{{uc:bleedTickets}}]]
[[Category:Functions|{{uc:bleedTickets}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:bleedTickets}}]]

Latest revision as of 12:28, 8 November 2023

Hover & click on the images for description

Description

Description:
Function that handles bleeding ticket system. Tickets are set beforehand using BIS_fnc_respawnTickets.
Execution:
call
Multiplayer:
Server-side execution only.
Groups:
Missions

Syntax

Syntax:
[sides, dominanceRatio, bleedingAmount, bleedingDelay] call BIS_fnc_bleedTickets
Parameters:
sides: Array - (Optional, default All sides) array of effected sides
dominanceRatio: Number - (Optional, default 0.5) dominance ratio, values from 0 to 1. Determines how much of a sector a side must hold for bleeding tickets to start
bleedingAmount: Number - (Optional, default 3) amount of tickets bled every step. Optional parameter
bleedingDelay: Object - (Optional, default 5) delay in seconds between every bleeding step
Return Value:
Boolean

Examples

Example 1:
call BIS_fnc_bleedTickets;
Example 2:
[[west, east], 1, 1, 10] call BIS_fnc_bleedTickets;

Additional Information

See also:
BIS_fnc_addScriptedEventHandler BIS_fnc_respawnTickets

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
Tryteyker- - c
Posted on Sep 29, 2014 - 19:58 (UTC)
The function calls on the scripted eventhandler (see BIS_fnc_addScriptedEventHandler) "dominantSideChanged" everytime a sector changes dominant side (this again depending on the value given to the function).