|Description:||Adds a system event handler.|
Multiple event handlers of the same type can be added. Unlike addEventHandler, system events are not tied to a specific object. Instead, they are triggered by global ("system") events, such as opening the OME / RTE.
The code run by the event handler has access to the following variables:
|Syntax:||[type, code, params] call fn_vbs_addSysEventHandler|
|Return Value:||Number - Index of added event. Note that the same index can be used again, after the events are removed.|
When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.
_idx = ["editorUnload","[_index] execVM 'dialog.sqf'"] call fn_vbs_addSysEventHandler
|See also:||VBS Custom Event Handlers, fn vbs removeSysEventHandler, fn vbs fireSysEventHandler, addEventHandler|