addMusicEventHandler: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<dl class='command_description'>" to "<dl class="command_description">") |
Lou Montana (talk | contribs) m (Text replacement - "\|( *\[\[[a-zA-Z]+\]\]) - ([a-z -]+) \|x1=" to "|r1=$1 - $2 |x1=") |
||
Line 21: | Line 21: | ||
* 1: this event handler id | * 1: this event handler id | ||
| [[Number]] - event handler id | |r1= [[Number]] - event handler id | ||
|x1= <code>_ehID = [[addMusicEventHandler]] ["MusicStart", {[[hint]] [[str]] _this}];</code> | |x1= <code>_ehID = [[addMusicEventHandler]] ["MusicStart", {[[hint]] [[str]] _this}];</code> |
Revision as of 14:34, 10 June 2021
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:
- Number - event handler id
Examples
- Example 1:
_ehID = addMusicEventHandler ["MusicStart", {hint str _this}];
- Example 2:
_ehID = addMusicEventHandler ["MusicStop", {hint str _this}];
Additional Information
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.