BIS fnc setServerVariable: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
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...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.00 | |1.00 | ||
|gr1= Variables | |gr1= Variables | ||
| Set variable stored only on server. Clients can the download it using [[BIS_fnc_getServerVariable]]. Used when you want to share variables only to specific clients to prevent large traffic. | | Set variable stored only on server. Clients can the download it using [[BIS_fnc_getServerVariable]]. Used when you want to share variables only to specific clients to prevent large traffic. | ||
| [namespace, varName, value] call [[BIS_fnc_setServerVariable]] | | [namespace, varName, value] call [[BIS_fnc_setServerVariable]] | ||
|p1= namespace: [[Namespace]] or [[Object]] or [[Group]] - (Optional, default [[missionNamespace]]) | |p1= namespace: [[Namespace]] or [[Object]] or [[Group]] - (Optional, default [[missionNamespace]]) | ||
|p2= varName: [[String]] - variable name | |p2= varName: [[String]] - variable name | ||
|p3= value: [[Anything]] - variable value | |p3= value: [[Anything]] - variable value | ||
| [[Boolean]] - [[true]] when done | | [[Boolean]] - [[true]] when done | ||
|x1= <code><nowiki>[</nowiki>[[nil]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> | |x1= <code><nowiki>[</nowiki>[[nil]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> | ||
|x2= <code><nowiki>[</nowiki>[[player]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> | |x2= <code><nowiki>[</nowiki>[[player]], "playerHealth", [[damage]] [[player]]] [[call]] [[BIS_fnc_setServerVariable]];</code> | ||
| [[BIS_fnc_getServerVariable]], [[publicVariableServer]], [[publicVariableClient]] | | [[BIS_fnc_getServerVariable]], [[publicVariableServer]], [[publicVariableClient]] | ||
}} | }} | ||
Revision as of 23:45, 17 January 2021
Description
- Description:
- Set variable stored only on server. Clients can the download it using BIS_fnc_getServerVariable. Used when you want to share variables only to specific clients to prevent large traffic.
- Execution:
- call
- Groups:
- Variables
Syntax
- Syntax:
- [namespace, varName, value] call BIS_fnc_setServerVariable
- Parameters:
- namespace: Namespace or Object or Group - (Optional, default missionNamespace)
- varName: String - variable name
- value: Anything - variable value
- Return Value:
- Boolean - true when done
Examples
- Example 1:
[nil, "playerHealth", damage player] call BIS_fnc_setServerVariable;
- Example 2:
[player, "playerHealth", damage player] call BIS_fnc_setServerVariable;
Additional Information
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