publicVariable: Difference between revisions
Categories: Scripting CommandsIntroduced with Operation Flashpoint version 1.34Operation Flashpoint: New Scripting CommandsOperation Flashpoint: Scripting CommandsOperation Flashpoint: Elite: Scripting CommandsArmA: Armed Assault: Scripting CommandsArma 2: Scripting CommandsArma 2: Operation Arrowhead: Scripting CommandsTake On Helicopters: Scripting CommandsArma 3: Scripting CommandsCommand Group: MultiplayerCommand Group: VariablesScripting Commands: Global Effect
Lou Montana (talk | contribs) m (Text replacement - "[[Initialization Order" to "[[Initialisation Order") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 50: | Line 50: | ||
{{!}}- | {{!}}- | ||
! Since | ! Since | ||
{{!}} | {{!}} colspan="4" {{!}} {{GVI|ofp|1.34}} | ||
{{!}} {{GVI|ofp|1.34}} | {{!}} colspan="2" {{!}} {{GVI|arma1|1.00}} | ||
{{!}} | {{!}} colspan="2" {{!}} {{GVI|arma1|1.09}} | ||
{{!}} {{GVI|arma1|1.00}} | |||
{{!}} | |||
{{!}} {{GVI|arma1|1.09}} | |||
{{!}} {{GVI|arma3|1.26}} | {{!}} {{GVI|arma3|1.26}} | ||
{{!}} {{GVI|arma3|2.02}} | {{!}} {{GVI|arma3|2.02}} | ||
{{!}}} | {{!}}} | ||
{{Feature|important|It is not possible (and illogical) to transfer a local entity reference, such as [[Script Handle|scripts]], [[Display|displays]] or [[createVehicleLocal|local objects]].<br> | {{Feature|important| | ||
Also, note that [[Team Member]] is not supported.}} | It is not possible (and illogical) to transfer a local entity reference, such as [[Script Handle|scripts]], [[Display|displays]] or [[createVehicleLocal|local objects]].<br> | ||
Also, note that [[Team Member]] is not supported. | |||
}} | |||
|s1= [[publicVariable]] varName | |s1= [[publicVariable]] varName |
Latest revision as of 16:57, 26 July 2023
Description
- Description:
- Reliably broadcasts missionNamespace variable and its current value to all computers (server/client).
Variables broadcast with publicVariable during a mission will be available to JIP clients with the value they held at the time.
Such variables are persistent and sent to the JIP client before the first batch of client-side Event Scripts (such as init.sqf) is run.
The following Data Types are supported:Type Number Boolean Object Group String Text Array Code Nothing (nil) HashMap Since 1.34
1.00
1.09
1.26
2.02
- Groups:
- MultiplayerVariables
Syntax
- Syntax:
- publicVariable varName
- Parameters:
- varName: String - the global variable's Identifier
- Return Value:
- Nothing
Examples
- Example 1:
- Example 2:
- JIP example:
- Example 3:
Additional Information
- See also:
- Multiplayer Scripting Initialisation Order addPublicVariableEventHandler publicVariableClient publicVariableServer Global Variable Event Scripts Join In Progress
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
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.34
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Multiplayer
- Command Group: Variables
- Scripting Commands: Global Effect