removeMusicEventHandler: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ")
m (Some wiki formatting)
Line 12: Line 12:
|s1= [[removeMusicEventHandler]] [type, id]
|s1= [[removeMusicEventHandler]] [type, id]


|p1= [type, id]: [[Array]]
|p1= type: [[String]] - "MusicStart" or "MusicStop"


|p2= type: [[String]] - "MusicStart" or "MusicStop"
|p2= id: [[Number]] - event handler id
 
|p3= id: [[Number]] - event handler id


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>[[removeMusicEventHandler]] ["MusicStart", 12];</code>
|x1= <code>[[removeMusicEventHandler]] ["MusicStart", 12];</code>
|x2= <code>[[removeMusicEventHandler]] ["MusicStop", 12];</code>
|x2= <code>[[removeMusicEventHandler]] ["MusicStop", 12];</code>
|x3= <code>hnd_stop = [[addMusicEventHandler]] ["MusicStop",{}];
 
[[removeMusicEventHandler]] ["MusicStop",hnd_stop];
|x3= <code>[[private]] _stopMusicEH = [[addMusicEventHandler]] ["MusicStop", {}];
{{cc|...}}
[[removeMusicEventHandler]] ["MusicStop", _stopMusicEH];
</code>
</code>


|seealso= [[addMusicEventHandler]], [[setMusicEventHandler]], [[removeAllMusicEventHandlers]], [[playMusic]]
|seealso= [[addMusicEventHandler]], [[setMusicEventHandler]], [[removeAllMusicEventHandlers]], [[playMusic]]
}}
}}

Revision as of 18:50, 24 November 2021

Hover & click on the images for description

Description

Description:
Removes specified music track event handler.
Groups:
Event HandlersSounds

Syntax

Syntax:
removeMusicEventHandler [type, id]
Parameters:
type: String - "MusicStart" or "MusicStop"
id: Number - event handler id
Return Value:
Nothing

Examples

Example 1:
removeMusicEventHandler ["MusicStart", 12];
Example 2:
removeMusicEventHandler ["MusicStop", 12];
Example 3:
private _stopMusicEH = addMusicEventHandler ["MusicStop", {}]; // ... removeMusicEventHandler ["MusicStop", _stopMusicEH];

Additional Information

See also:
addMusicEventHandlersetMusicEventHandlerremoveAllMusicEventHandlersplayMusic

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