Warning: file_put_contents(/ff_52f382bd976ec68af281532511f7c4a12bd5e2eb9f11d0d8.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


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



soldier1 setVariable ["food_level", 50, true];