addMusicEventHandler: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>") |
Killzone Kid (talk | contribs) No edit summary |
||
Line 27: | Line 27: | ||
|x2= <sqf>private _ehID = addMusicEventHandler ["MusicStop", { hint str _this }];</sqf> | |x2= <sqf>private _ehID = addMusicEventHandler ["MusicStop", { hint str _this }];</sqf> | ||
|seealso= [[setMusicEventHandler]] [[playMusic]] [[removeMusicEventHandler]] [[removeAllMusicEventHandlers]] | |seealso= [[setMusicEventHandler]] [[playMusic]] [[removeMusicEventHandler]] [[removeAllMusicEventHandlers]] [[getEventHandlerInfo]] | ||
}} | }} | ||
Revision as of 18:27, 7 July 2022
Description
- Description:
- Adds playMusic event handler. Returns id of the handler or -1 when failed. Like addMissionEventHandler, the music event handler is attached to the mission.
- Groups:
- Event HandlersSounds
Syntax
- Syntax:
- addMusicEventHandler [type, function]
- Parameters:
- type: String - "MusicStart" or "MusicStop"
- function: String or Code - passed params array is [musicClassname, eventHandlerId] where:
params ["_musicClassname", "_ehId"];
- Return Value:
- Number - event handler id
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- setMusicEventHandler playMusic removeMusicEventHandler removeAllMusicEventHandlers getEventHandlerInfo
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 Mar 04, 2013 - 13:30 (UTC)
- There are these two types at this time: