BIS fnc bleedTickets: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Added params, syntax, examples.)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Function that handles bleeding ticket system. Tickets are set beforehand using [[BIS_fnc_respawnTickets]]. |= Description
 
Description:
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.
 
Parameter(s):
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:
BOOL
*/
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_bleedTickets]]; --> |= Syntax
| [<nowiki>[WEST,EAST,RESISTANCE,CIVILIAN]</nowiki>, 0.5, 3, 5] call '''BIS_fnc_bleedTickets'''; |= Syntax


|p1= |= Parameter 1
|p1= [[Array]] - Array of sides that should be affected by bleed tickets. ''Optional parameter, default is '''all''' sides''.|=
|p2= [[Number]] - Dominance ratio, values from 0 to 1. Determines how much of a sector a side must hold for bleeding tickets to start. ''Optional parameter, default is 0.5 (ie half a sector)''. |=
|p3= [[Number]] - Amount of tickets bled every step. ''Optional parameter, default value 3''. |=
|p4= [[Number]] - Delay in seconds between every bleeding step. ''Optional parameter, default value 5''. |=


| |= Return value
| [[Boolean]] |= Return value
|mp= Server-side execution only. |=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>[] call BIS_fnc_bleedTickets; // Uses all default values to start the system.</code> |=
|x2= <code><nowiki>[[WEST,EAST], 1, 1, 10]</nowiki> call BIS_fnc_bleedTickets; // Starts the system with WEST and EAST involved, bleeding one ticket every ten seconds if one side holds the whole sector.</code> |=  
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[BIS_fnc_addScriptedEventHandler]] |= See also


}}
}}

Revision as of 21:56, 29 September 2014


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:
Uncategorised

Syntax

Syntax:
[[WEST,EAST,RESISTANCE,CIVILIAN], 0.5, 3, 5] call BIS_fnc_bleedTickets;
Parameters:
Array - Array of sides that should be affected by bleed tickets. Optional parameter, default is all sides.
Number - Dominance ratio, values from 0 to 1. Determines how much of a sector a side must hold for bleeding tickets to start. Optional parameter, default is 0.5 (ie half a sector).
Number - Amount of tickets bled every step. Optional parameter, default value 3.
Number - Delay in seconds between every bleeding step. Optional parameter, default value 5.
Return Value:
Boolean

Examples

Example 1:
[] call BIS_fnc_bleedTickets; // Uses all default values to start the system.
Example 2:
[[WEST,EAST], 1, 1, 10] call BIS_fnc_bleedTickets; // Starts the system with WEST and EAST involved, bleeding one ticket every ten seconds if one side holds the whole sector.

Additional Information

See also:
BIS_fnc_addScriptedEventHandler

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

Notes

Bottom Section