addMPEventHandler: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (removed -) |
m (Bot: Replacing category Scripting Commands Arma 3 with Arma 3: Scripting Commands) |
||
Line 38: | Line 38: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
<!-- CONTINUE Notes --> | <!-- CONTINUE Notes --> | ||
<dl class="command_description"> | <dl class="command_description"> | ||
Line 55: | Line 47: | ||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> | ||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Arma 3: Scripting Commands]] | |||
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]] | |||
[[Category:ArmA 2 OA: New Scripting Commands List|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Command Group: Multiplayer|{{uc:{{PAGENAME}}}}]] |
Revision as of 16:24, 3 December 2018
Description
- Description:
- Adds MP event handler (EH) to the given object and returns EH handle. MP event handlers are added globally to every client on network in multiplayer and will fire on every client too upon event. If EH has some data to return upon event (e.g. the "MPKilled" EH will return an array with 2 elements: the killed unit, and the killer), it is passed in _this variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in _thisEventHandler variable and is available during EH code execution.
For more information see: Arma_3:_Event_Handlers#addMPEventHandler - Groups:
- Uncategorised
Syntax
- Syntax:
- object addMPEventHandler [type, expression]
- Parameters:
- object: Object - object to monitor
- [type, expression]: Array
- type: String - event handler name
- expression: String or Code - expression to execute
- Return Value:
- Number
Examples
- Example 1:
_index = player addMPEventHandler ["mpkilled", {Null = _this execVM "playerkilled.sqf";}];
Additional Information
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
Notes
Bottom Section
- Posted on May 8, 2015 - 12:24 (UTC)
- Killzone Kid
- MP EHs are added on every PC and execute on every PC, apart from MPRespawn, that only executes at the locality where unit respawns.
Categories:
- Scripting Commands
- Introduced with Arma 2: Operation Arrowhead version 1.55
- Arma 2: Operation Arrowhead: New Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands: Global Effect
- Scripting Commands ArmA2
- Arma 3: Scripting Commands
- Scripting Commands Take On Helicopters
- ArmA 2 OA: New Scripting Commands List
- Command Group: Multiplayer