publicVariable: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Command|= Comments | |||
____________________________________________________________________________________________ | |||
| ofp |= Game name | |||
|1.34|= Game version | |||
____________________________________________________________________________________________ | |||
| Broadcast variable value to all computers. Only type [[Number]] is supported in version 1.33 and before. Following [[Types]] are supported since version 1.34: | |||
* [[Number]] | * [[Number]] | ||
* [[Boolean]] | * [[Boolean]] | ||
* [[Object]] | * [[Object]] | ||
* [[Group]] | * [[Group]] | ||
|= Description | |||
____________________________________________________________________________________________ | |||
| '''publicVariable''' varName |= Syntax | |||
|p1= varName: [[String]] |= Parameter 1 | |||
| [[Nothing]] |= Return value | |||
____________________________________________________________________________________________ | |||
|x1= <pre>publicVariable "CTFscoreOne" | |||
Note: This command broadcasts a variable to all clients, but as soon as you change the variable again, you have to use publicVariable again, as it does not automatically synchronise it.</pre> |= Example 1 | |||
____________________________________________________________________________________________ | |||
| |= See also | |||
}} | |||
<h3 style="display:none">Notes</h3> | |||
<dl class="command_description"> | |||
<!-- Note Section BEGIN --> | |||
<!-- Note Section END --> | |||
</dl> | |||
<h3 style="display:none">Bottom Section</h3> | |||
[[Category:Scripting Commands|PUBLICVARIABLE]] | |||
[[Category:Scripting Commands OFP 1.96|PUBLICVARIABLE]] | |||
[[Category:Scripting Commands OFP 1.46|PUBLICVARIABLE]] | |||
[[Category:Scripting Commands ArmA|PUBLICVARIABLE]] |
Revision as of 00:06, 2 August 2006
Description
- Description:
- Broadcast variable value to all computers. Only type Number is supported in version 1.33 and before. Following Types are supported since version 1.34:
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
publicVariable "CTFscoreOne" Note: This command broadcasts a variable to all clients, but as soon as you change the variable again, you have to use publicVariable again, as it does not automatically synchronise it.
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