Warning: file_put_contents(/ff_33980953a3db270af6122d083fcf018a1d0bd912f481f832.php): failed to open stream: Permission denied in /home/ofpecsav/public_html/forum/Sources/Subs-ForumFirewall.php on line 1619
setMusicEventHandler - OFPEC Scripting Command Reference | OFPEC The Editing Center

setMusicEventHandler [type, function]

Operand types

[type, function]: Array

Type of returned value


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



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