BIS fnc counter: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(24 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=function | ||
| tkoh | |game1= tkoh | ||
|version1= 1.00 | |||
| | |game2= arma3 | ||
|version2= 0.50 | |||
| | |arg= global | ||
|eff= local | |||
| | |gr1= Systems | ||
|descr= Modify the given counter, create it if does not exist. | |||
{{Feature|important|It is '''not''' possible to broadcast the counter (like [[setVariable]] does) with this function.}} | |||
|s1= [varName, add, modulo] call [[BIS_fnc_counter]] | |||
|p1= varName: [[String]] or [[Array]] format [varName, namespace] - default namespace is [[missionNamespace]] | |||
|p2= add: [[Number]] - (Optional, default 0) the value to be added | |||
| | |p3= modulo: [[Number]] - (Optional, default -1) the [[mod]]ulo to use for counter cycle, applied after the addition | ||
| | |r1= [[Number]] the new counter value | ||
|x1= <sqf>[["TAG_Score", player], 1] call BIS_fnc_counter;</sqf> | |||
|x1= < | |||
|seealso= [[BIS_fnc_deleteCounter]] | |||
}} | }} | ||
Latest revision as of 16:43, 11 April 2024
Description
Syntax
- Syntax:
- [varName, add, modulo] call BIS_fnc_counter
- Parameters:
- varName: String or Array format [varName, namespace] - default namespace is missionNamespace
- add: Number - (Optional, default 0) the value to be added
- modulo: Number - (Optional, default -1) the modulo to use for counter cycle, applied after the addition
- Return Value:
- Number the new counter value
Examples
- Example 1:
Additional Information
- See also:
- BIS_fnc_deleteCounter
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