Audio::triggerMusicEvent: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
List of all usable event names found in b617d used with this native. Sorted alphabetically and identical names removed: pastebin.com/RzDFmB1W<br><br>All music event names found in the b617d scripts: pastebin.com/GnYt0R3P==Syntax==<syntaxhighlight lang="javascript">audio.triggerMusicEvent(eventName);</syntaxhighlight>=== Required Arguments ===*'''eventName:''' String===Return value===*'''Boolean'''==Example==<syntaxhighlight lang="javascript">todo</syntaxhighlight>==See also=={{Audio_function_c}}[[Category:Clientside API]][[Category:TODO: Example]]
List of all usable event names found in b617d used with this native. Sorted alphabetically and identical names removed: pastebin.com/RzDFmB1W<br><br>All music event names found in the b617d scripts: pastebin.com/GnYt0R3P
==Syntax==
<syntaxhighlight lang="javascript">mp.game.audio.triggerMusicEvent(eventName);</syntaxhighlight>
=== Required Arguments ===
*'''eventName:''' String
===Return value===
*'''Boolean'''
{{ClientsideCode|
<pre>
mp.game.audio.triggerMusicEvent('AH3B_DOOR_52'); //play a provided music in the pastebin link above
setTimeout(() => {
    mp.game.audio.triggerMusicEvent('GLOBAL_KILL_MUSIC'); //stop the music after 5 seconds
}, 5000);
</pre>
}}
 
==See also==
{{Audio_s_function_c}}
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 17:41, 12 October 2021

List of all usable event names found in b617d used with this native. Sorted alphabetically and identical names removed: pastebin.com/RzDFmB1W

All music event names found in the b617d scripts: pastebin.com/GnYt0R3P

Syntax

mp.game.audio.triggerMusicEvent(eventName);

Required Arguments

  • eventName: String

Return value

  • Boolean
Client-Side
mp.game.audio.triggerMusicEvent('AH3B_DOOR_52'); //play a provided music in the pastebin link above 
setTimeout(() => {
    mp.game.audio.triggerMusicEvent('GLOBAL_KILL_MUSIC'); //stop the music after 5 seconds
}, 5000);
 

See also