Warning: file_put_contents(/ff_86322220437cb19a07a9459152e16ee7d28508d7efe6d7f0.php): failed to open stream: Permission denied in /home/ofpecsav/public_html/forum/Sources/Subs-ForumFirewall.php on line 1619
setVariable - OFPEC Scripting Command Reference | OFPEC The Editing Center

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];

Advertisement