setMusicEventHandler
- Deprecated
- Arma 3 v1.02
Command · also in Sounds · Markdown · JSON · 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. Reason: Use addMusicEventHandler instead as it can stack music event handlers.
Syntax
setMusicEventHandler [type, function]
Parameters:
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
Returns: Nothing
Examples
Example 1
setMusicEventHandler ["MusicStart", "hint str _this"];
Example 2
setMusicEventHandler ["MusicStop", "hint str _this"];
See also
addMusicEventHandler · removeMusicEventHandler · playMusic · removeAllMusicEventHandlers