setMusicEventHandler [type, function]

Operand types

[type, function]: Array

Type of returned value

Description

Sets given music track event handler. Will overwrite other music event handlers. Use addMusicEventHandler if you want to stack them.

  • type: String - "MusicStart" or "MusicStop"

  • function: String - script to be executed. Passes params array 0: class name of the sound in CfgMusic, 1: event handler id


Returned value is the id of the event handler.

Used In

Arma3

Example

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