publicVariable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (added to mp cat)
(Extended)
Line 23: Line 23:
* [[String]]
* [[String]]
Since version [[ArmA]] v1.09:
Since version [[ArmA]] v1.09:
Any value can be transferred, including
* [[Array]]  
* [[Array]]  
* [[Code]]
The only limitation is you cannot transfer references to entities which are local, like [[Script|scripts]], [[Display|displays]], or local objects.
|= Description
|= Description
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 38: Line 42:


| [[addPublicVariableEventHandler]] |= See also
| [[addPublicVariableEventHandler]] |= See also
| mp= The message is sent reliably to all clients. Using publicVariable a lot can cause other parts of the game to experiencing bandwidth problems.|=
| mp= The message is sent reliably to all clients. Using publicVariable a lot can cause other parts of the game to experience bandwidth problems.|=
}}
}}



Revision as of 23:34, 21 December 2007

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: Following Types are supported since version ArmA v1.00: Since version ArmA v1.09: Any value can be transferred, including The only limitation is you cannot transfer references to entities which are local, like scripts, displays, or local objects.
Multiplayer:
The message is sent reliably to all clients. Using publicVariable a lot can cause other parts of the game to experience bandwidth problems.
Groups:
Uncategorised

Syntax

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

Examples

Example 1:
publicVariable "CTFscoreOne"

Additional Information

See also:
addPublicVariableEventHandler

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

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.

Bottom Section