addMusicEventHandler: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <dd class="notedate">" to " <dt><dt> <dd class="notedate">")
m (Text replacement - "<!-- Note Section [A-Z]+ --> " to "")
Line 31: Line 31:


<dl class='command_description'>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<dt><dt>
<dt><dt>
<dd class="notedate">Posted on March 4, 2013 - 13:30</dd>
<dd class="notedate">Posted on March 4, 2013 - 13:30</dd>
Line 38: Line 37:
'''MusicStop''' - It is triggered when the music is ended (command [[playMusic]]). In variable _this is stored class name from [[Description.ext#Music|CfgMusic]].
'''MusicStop''' - It is triggered when the music is ended (command [[playMusic]]). In variable _this is stored class name from [[Description.ext#Music|CfgMusic]].


<!-- Note Section END -->
</dl>
</dl>

Revision as of 00:33, 6 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Event HandlersSounds

Syntax

Syntax:
Syntax needed
Parameters:
[type, function]: Array
type: String - "MusicStart" or "MusicStop"
function: String or Code. Passed params array:
  • 0: CfgMusic class name
  • 1: this event handler id
Return Value:
Return value needed

Examples

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

Additional Information

See also:
setMusicEventHandlerplayMusicremoveMusicEventHandlerremoveAllMusicEventHandlers

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
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.