addMusicEventHandler

From Bohemia Interactive Community
Revision as of 14:37, 4 March 2013 by DarkDruid (talk | contribs)
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Add an music track event handler. Returns id of the handler or -1 when failed.
Groups:
Uncategorised

Syntax

Syntax:
addMusicEventHandler [type, function]
Parameters:
[type, function]: Array
type: String
function: String or Code
Return Value:
Number

Examples

Example 1:
addMusicEventHandler ["MusicStart", "hint format['Sample %1 start', _this select 0]"]

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Posted on March 4, 2013 - 13:30
Druid
There are these two types at this time:
MusicStart - It is triggered when the music is started (command playMusic). In variable _this is stored class name from CfgMusic.
MusicStop - It is triggered when the music is ended (command playMusic). In variable _this is stored class name from CfgMusic.

There is no return value in Arma 3 version 0.50, will be fixed ASAP.

Bottom Section