Arma 3 Scripting

Command in Event Handlers, Sounds

setMusicEventHandler

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

Warning

This command is deprecated. Use addMusicEventHandler instead.

Description

Sets given music track event handler. Will overwrite other music event handlers.

Caution

This information is obsolete. Use addMusicEventHandler instead as it can stack music event handlers.

Syntax

setMusicEventHandler [type, function]

Parameters:

Returns: Number - id of the event handler

Examples

Example 1

_ehID = setMusicEventHandler ["MusicStart", "hint str _this"];

Example 2

_ehID = setMusicEventHandler ["MusicStop", "hint str _this"];

See also

addMusicEventHandler · removeMusicEventHandler · playMusic · removeAllMusicEventHandlers