|Description:||If the event handler detects a change using publicVariable on the given variable, the code executes.|
The following parameters are transferred to the code:
|Syntax:||varName addPublicVariableEventHandler code|
|Multiplayer:||Note that the EH is only fired on clients where the publicVariable command has not been executed, as publicVariable does not change the variable where it has been executed.|
- Please note that varName indicates which variable you want to monitor with this eventhandler.
As a result, the example eventhandler on this page will only fire when the variable publicThis has been changed, but not if any other variable was changed by any other client via the publicVariable command.