addMusicEventHandler: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma3 |= Game name |0.50|= Game version ____________________...")
 
No edit summary
Line 21: Line 21:




|x1= <code>
|x1= <code>addMusicEventHandler ["MusicStart", "hint format['Sample %1 start', _this select 0]"]</code>|= EXAMPLE1  
</code>|= EXAMPLE1  


____________________________________________________________________________________________
____________________________________________________________________________________________
Line 35: Line 34:
<dl class='command_description'>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on March 4, 2013 - 13:30
<dt class="note">'''[[User:Druid|Druid]]'''<dd class="note">There are these two types at this time:<br/>
'''MusicStart''' - It is triggered when the music is started (command playMusic). In variable _this is stored class name from CfgMusic.<br/>
'''MusicStop''' - It is triggered when the music is ended (command playMusic). In variable _this is stored class name from CfgMusic.<br/><br/>
There is no return value in Arma 3 version 0.50, will be fixed ASAP.


<!-- Note Section END -->
<!-- Note Section END -->

Revision as of 14:37, 4 March 2013

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