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

variableName addPublicVariableEventHandler code

Operand types

variableName: String
code: Code

Type of returned value

Description

If the EH detects a change via publicVariable on the given variableName, code will be executed.
The following arguments are transferred to the code:

* _this select 0: Variable name
* _this select 1: New variable value

Used In

ArmA

Example

"mypublicVar" addPublicVariableEventHandler {hint ((_this select 0) + " has been modified to: " + str (_this select 1))}

Advertisement