objectName setVariable [name, value,public]
Operand types
objectName:
Object[name, value,public]:
Array
Type of returned value
Description
Set variable to given value in the variable space of given object.
If public is true then the value is broadcast to all computers.
When a JIP player connects, the variables that were set with public set to true are synchronized in his client.
Value might be any value, including arrays.
Used In
Arma2
Example
soldier1 setVariable ["food_level", 50, true];