# Event Handlers (scripting commands)

- [add3DENEventHandler](../../commands/add3DENEventHandler.md): Adds an Eden Editor Event Handler.
- [addEventHandler](../../commands/addEventHandler.md): Adds an Event Handler to the given object. - As many Event Handlers of any type can be added - existing Event Handlers do not get overwritten - Use removeEventHandler to remove an Event Handler Read Event Handlers for…
- [addMissionEventHandler](../../commands/addMissionEventHandler.md): 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
- [addMPEventHandler](../../commands/addMPEventHandler.md): Adds a multiplayer event handler (EH) to the given object and returns EH handle. See Event Handlers.
- [addMusicEventHandler](../../commands/addMusicEventHandler.md): Adds playMusic event handler. Returns id of the handler or -1 when failed. Like addMissionEventHandler, the music event handler is attached to the mission. See Arma 3: Event Handlers#Music Event Handlers.
- [addPublicVariableEventHandler](../../commands/addPublicVariableEventHandler.md) **[broken]**: This event handler will detect if a missionNamespace variable (it is attached to) has been broadcast over network with publicVariable, publicVariableClient or publicVariableServer commands and will execute EH code upon…
- [addUserActionEventHandler](../../commands/addUserActionEventHandler.md): Adds a user action event handler to the current mission and returns its event handler index.
- [ctrlAddEventHandler](../../commands/ctrlAddEventHandler.md): Add an event handler to the given control.
- [ctrlRemoveAllEventHandlers](../../commands/ctrlRemoveAllEventHandlers.md): Remove all event handlers from the given control.
- [ctrlRemoveEventHandler](../../commands/ctrlRemoveEventHandler.md): Remove a given event handler from the given control.
- [ctrlSetEventHandler](../../commands/ctrlSetEventHandler.md) **[deprecated]**: Sets given event handler of given control: any previously added event handler is removed.
- [diag_allMissionEventHandlers](../../commands/diag_allMissionEventHandlers.md): Returns an array with all mission event handlers.
- [displayAddEventHandler](../../commands/displayAddEventHandler.md): Adds an event handler to the given display. See User Interface Event Handlers for the full list of event names.
- [displayRemoveAllEventHandlers](../../commands/displayRemoveAllEventHandlers.md): Remove all event handlers from the given display.
- [displayRemoveEventHandler](../../commands/displayRemoveEventHandler.md): Remove a given event handler from the given display.
- [displaySetEventHandler](../../commands/displaySetEventHandler.md): Sets given event handler of given display. The return code of the provided function should indicate whether this event was handled correctly.
- [editorSetEventHandler](../../commands/editorSetEventHandler.md): Sets given event handler of given editor.
- [getEventHandlerInfo](../../commands/getEventHandlerInfo.md): Queries given event handler's information.
- [inGameUISetEventHandler](../../commands/inGameUISetEventHandler.md): Sets given event handler of in-game UI. If EH function returns true, performed action is overridden.
- [onBriefingGroup](../../commands/onBriefingGroup.md): Select a sound declared in the Description.ext of the mission to be played the first time the Group tab is selected in the briefing.
- [onBriefingNotes](../../commands/onBriefingNotes.md): Select a sound declared in the Description.ext of the mission to be played the first time the Notes tab is selected in the briefing.
- [onBriefingPlan](../../commands/onBriefingPlan.md): Select a sound declared in the Description.ext of the mission to be played the first time the Plan tab is selected in the briefing.
- [onBriefingTeamSwitch](../../commands/onBriefingTeamSwitch.md): Select a sound defined in the CfgSounds of the mission to be played the first time the TeamSwitch tab is selected in the briefing.
- [onCommandModeChanged](../../commands/onCommandModeChanged.md): Defines code performed when hc command mode changes either because of (Left Ctrl + Space) shortcut or hcShowBar scripting command.
- [onEachFrame](../../commands/onEachFrame.md): Runs given statement every frame in an unscheduled environment.
- [onGroupIconClick](../../commands/onGroupIconClick.md): Defines an action performed when player clicked on group marker (3D or in a map). The code executed once.
- [onGroupIconOverEnter](../../commands/onGroupIconOverEnter.md): Defines an action performed when player moves pointer over group marker (3D or in a map). The code will execute continuously while pointer is over icon.
- [onGroupIconOverLeave](../../commands/onGroupIconOverLeave.md): Defines an action performed when pointer, previously positioned over icon, is moved away from it (3D or in a map). The code is executed once.
- [onHCGroupSelectionChanged](../../commands/onHCGroupSelectionChanged.md): Defines an action performed when high command group selection has been changed.
- [onMapSingleClick](../../commands/onMapSingleClick.md): Defines the action performed when user clicks in map by executing command string.
- [onPlayerConnected](../../commands/onPlayerConnected.md): This command will execute the provided code on the server whenever a player connects to a multiplayer session.
- [onPlayerDisconnected](../../commands/onPlayerDisconnected.md): This command will execute attached code whenever a player is leaving an MP session. The code will receive a number of special variables:
- [onPreloadFinished](../../commands/onPreloadFinished.md): Defines an action performed after the preload screen finished. Preload event occurs after briefing screen on mission start.
- [onPreloadStarted](../../commands/onPreloadStarted.md): Defines an action performed just before the preload screen started. Preload event occurs after briefing screen on mission start.
- [onTeamSwitch](../../commands/onTeamSwitch.md) **[deprecated]**: Defines an action performed when the team switch is finished. Commandset receives the following special variables: *_from* object previous unit, *_to* object current unit.
- [remove3DENEventHandler](../../commands/remove3DENEventHandler.md): Removes Eden Editor event handler of given type and ID.
- [removeAll3DENEventHandlers](../../commands/removeAll3DENEventHandlers.md): Removes all Eden Editor event handlers of given type.
- [removeAllEventHandlers](../../commands/removeAllEventHandlers.md): Removes all event handlers of given type that were added by addEventHandler and resets event handler's creation index to 0.
- [removeAllMissionEventHandlers](../../commands/removeAllMissionEventHandlers.md): Removes all mission event handlers of the given type which were added by addMissionEventHandler.
- [removeAllMusicEventHandlers](../../commands/removeAllMusicEventHandlers.md): Removes all music track event handlers of given type.
- [removeAllUserActionEventHandlers](../../commands/removeAllUserActionEventHandlers.md): Removes all UserAction event handlers of the given type which were added by addUserActionEventHandler.
- [removeEventHandler](../../commands/removeEventHandler.md): Removes a given Event Handler that was added with addEventHandler.
- [removeMissionEventHandler](../../commands/removeMissionEventHandler.md): Removes mission event handler added by addMissionEventHandler.
- [removeMPEventHandler](../../commands/removeMPEventHandler.md): Removes MP event handler added by addMPEventHandler.
- [removeMusicEventHandler](../../commands/removeMusicEventHandler.md): Removes specified music track event handler. See Arma 3: Event Handlers#Music Event Handlers.
- [removeUserActionEventHandler](../../commands/removeUserActionEventHandler.md): Removes a UserAction event handler. For a list of available UserAction event handlers, see: Arma 3: Mission Event Handlers.
- [setMusicEventHandler](../../commands/setMusicEventHandler.md) **[deprecated]**: Sets given music track event handler. Will overwrite other music event handlers.
