publicVariable: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "Data Types" to "Category: Data Types") |
Lou Montana (talk | contribs) m (Add HashMap) |
||
Line 30: | Line 30: | ||
{{!}} [[Code]] | {{!}} [[Code]] | ||
{{!}} [[Nothing]] ([[nil]]) | {{!}} [[Nothing]] ([[nil]]) | ||
{{!}} [[HashMap]] | |||
{{!}}- | {{!}}- | ||
! Since | ! Since | ||
Line 41: | Line 42: | ||
{{!}} {{GVI|arma1|1.09}} | {{!}} {{GVI|arma1|1.09}} | ||
{{!}} {{GVI|arma3|1.26}} | {{!}} {{GVI|arma3|1.26}} | ||
{{!}} {{GVI|arma3|2.02}} | |||
{{!}}} | {{!}}} | ||
Revision as of 18:59, 23 February 2021
Description
- Description:
- Description needed
- Groups:
- MultiplayerVariables
Syntax
- Syntax:
- Syntax needed
- Parameters:
- varName: String - the global variable's Identifier
- Return Value:
- Return value needed
Examples
- Example 1:
TAG_MyPublicVariable = 0; TAG_MyPublicVariable = 1; publicVariable "TAG_MyPublicVariable"; // other clients will receive the "TAG_MyPublicVariable" variable with a 1 value TAG_MyPublicVariable = 2; // needs to be broadcast again - synchronisation is not automatic
- Example 2:
- JIP example:
if (isNil "TAG_CurrentTarget") then // has the variable already been set and broadcast? { TAG_CurrentTarget = objNull; // if not, set it on the local machine }; player doTarget TAG_CurrentTarget;
- Example 3:
TAG_BossName = "EvilBigBoss"; publicVariable TAG_BossName; // wrong - will try to publicVariable "EvilBigBoss" variable, that does not exist publicVariable "TAG_BossName"; // correct - do not forget the quotes
Additional Information
- See also:
- See also needed
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:
- Stubs
- Scripting Commands
- Command Group: Multiplayer
- Command Group: Variables
- Scripting Commands: Global Effect
- Scripting Commands OFP 1.46
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.99
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands
- Take On Helicopters: Scripting Commands