setMusicEventHandler

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.02
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.02

Description

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

Syntax

Syntax:
setMusicEventHandler [type, function]
Parameters:
[type, function]: Array
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
Return Value:
Number - id of the event handler

Examples

Example 1:
_ehID = setMusicEventHandler ["MusicStart", "hint str _this"];
Example 2:
_ehID = setMusicEventHandler ["MusicStop", "hint str _this"];

Additional Information

Multiplayer:
-
See also:
addMusicEventHandlerremoveMusicEventHandlerplayMusicremoveAllMusicEventHandlers

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section