Arma 3 Scripting

Command in Event Handlers

addMissionEventHandler

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

Description

Adds event handler attached to the current mission and returns event handler handle. For the list of available mission event handlers see: Arma 3: Mission Event Handlers

Syntax

addMissionEventHandler [event, expression, arguments]

Parameters:

Returns: Number - the index of the currently added mission event handler is returned

Examples

Example 1

_id = addMissionEventHandler ["PlayerDisconnected", { systemChat str _this }];

Example 2

_id = addMissionEventHandler ["EachFrame", { systemChat str [_thisArgs, time] }, [time]];

See also

removeMissionEventHandler · removeAllMissionEventHandlers · getEventHandlerInfo