removeMusicEventHandler: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(9 intermediate revisions by the same user not shown)
Line 8: Line 8:
|gr2= Sounds
|gr2= Sounds


|descr= Removes specified music track event handler.
|descr= Removes specified music track event handler. See {{Link|Arma 3: Event Handlers#Music Event Handlers}}.


|s1= [[removeMusicEventHandler]] [type, id]
|s1= [[removeMusicEventHandler]] [type, id]
Line 18: Line 18:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>[[removeMusicEventHandler]] ["MusicStart", 12];</code>
|x1= <sqf>removeMusicEventHandler ["MusicStart", 12];</sqf>


|x2= <code>[[removeMusicEventHandler]] ["MusicStop", 12];</code>
|x2= <sqf>removeMusicEventHandler ["MusicStop", 12];</sqf>


|x3= <code>[[private]] _stopMusicEH = [[addMusicEventHandler]] ["MusicStop", {}];
|x3= <sqf>
{{cc|...}}
private _stopMusicEH = addMusicEventHandler ["MusicStop", {}];
[[removeMusicEventHandler]] ["MusicStop", _stopMusicEH];
// ...
</code>
removeMusicEventHandler ["MusicStop", _stopMusicEH];
</sqf>


|seealso= [[addMusicEventHandler]] [[setMusicEventHandler]], [[removeAllMusicEventHandlers]], [[playMusic]]
|seealso= [[addMusicEventHandler]] {{Link|Arma 3: Event Handlers#Music Event Handlers}} [[setMusicEventHandler]] [[removeAllMusicEventHandlers]] [[playMusic]]
}}
}}

Latest revision as of 19:42, 3 September 2024

Hover & click on the images for description

Description

Description:
Removes specified music track event handler. See Arma 3: Event Handlers - Music Event Handlers.
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:
addMusicEventHandler Arma 3: Event Handlers - Music Event Handlers setMusicEventHandler removeAllMusicEventHandlers playMusic

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