addPublicVariableEventHandler: Difference between revisions
Jump to navigation
Jump to search
(mp note) |
(see also, cats) |
||
Line 32: | Line 32: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[publicVariable]] |= See also | ||
| mp= Note that the EH is _only_ fired on those clients, where the [[publicVariable]] command has not been executed, as publicVariable does not change the variable where it has been executed. |= | | mp= Note that the EH is _only_ fired on those clients, where the [[publicVariable]] command has not been executed, as publicVariable does not change the variable where it has been executed. |= | ||
}} | }} | ||
Line 43: | Line 43: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category: | [[Category:Command_Group:_Multiplayer|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands|ADDPUBLICVARIABLEEVENTHANDLER]] | |||
[[Category:Scripting Commands | [[Category:Scripting Commands ArmA|ADDPUBLICVARIABLEEVENTHANDLER]] | ||
[[Category:Scripting Commands ArmA| |
Revision as of 18:48, 21 December 2007
Description
- Description:
- If the EH detects a change via publicVariable on the given variable, code will be executed. The following arguments are transferred to the code: _this select 0: variable name _this select 1: new variable value
- Multiplayer:
- Note that the EH is _only_ fired on those clients, where the publicVariable command has not been executed, as publicVariable does not change the variable where it has been executed.
- Groups:
- Uncategorised
Syntax
- Syntax:
- varName addPublicVariableEventHandler code
- Parameters:
- varName: String
- code: Code
- Return Value:
- Nothing
Examples
- Example 1:
"publicThis" addPublicVariableEventHandlere {hint ((_this select 0) + " has been updated to: " + str (_this select 1))}
Additional Information
- See also:
- publicVariable
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note