publicVariable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
[[Category:Scripting Commands|PUBLICVARIABLE]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|PUBLICVARIABLE]]
____________________________________________________________________________________________
[[Category:Scripting Commands OFP 1.46|PUBLICVARIABLE]]
[[Category:Scripting Commands ArmA|PUBLICVARIABLE]]


| ofp |= Game name


<h2 style="color:#000066">'''publicVariable ''varName'''''</h2>
|1.34|= Game version
 
____________________________________________________________________________________________
 
'''Operand types:'''
 
'''varName:''' [[String]]
 
'''Type of returned value:'''
 
[[Nothing]]
 
'''Compatibility:'''
 
Changed in version '''1.34'''
 
'''Description:'''
 
Broadcast variable value to all computers.
 
Only type [[Number]] is supported in version 1.33 and before.
 
Following [[:Category: Types | Types]] are supported since version 1.34:


| 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
____________________________________________________________________________________________


'''Example:'''
|  |= See also


'''publicVariable''' "CTFscoreOne"
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


'''Note:'''
<!-- Note Section END -->
</dl>


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.
<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 01:06, 2 August 2006

Hover & click on the images for description

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

Syntax:
publicVariable varName
Parameters:
varName: String
Return Value:
Nothing

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

Notes

Bottom Section