Arma 3 Scripting

Function in Event Handlers

BIS_fnc_addScriptedEventHandler

Also available as Markdown and JSON, or read the original wiki page.

Description

Adds a Scripted Event Handler and returns its ID. Additionally, the "ScriptedEventHandlerAdded" Scripted EH is called. For the full list of all available Scripted EHs see Arma 3: Scripted Event Handlers.

Syntax

[namespace, name, code] call BIS_fnc_addScriptedEventHandler

Parameters:

Returns: Number - the ID of the new Event Handler

Examples

Example 1

[missionNamespace, "event", { hint "Hello World" }] call BIS_fnc_addScriptedEventHandler;

Example 2

[true, "event", { hint "Hello World" }] call BIS_fnc_addScriptedEventHandler;

Boolean will default to missionNamespace.

See also

BIS_fnc_callScriptedEventHandler · BIS_fnc_removeScriptedEventHandler · BIS_fnc_removeAllScriptedEventHandlers