Skip to content

Expose more music functions to Lua

SteelT requested to merge lua-musicfuncs into next

This exposed the following functions to Lua for usage in scripts.

S_MusicType: Get the type of the music currently playing

S_MusicPlaying: See if a music is playing

S_MusicPaused: Check if music is paused or not

S_MusicName: Retrieves the name of the music currently playing

S_MusicExists: Checks if a music track with the specified arguments exists, it has a function signature of string music_name, boolean checkMIDI, boolean checkDigi

S_SetMusicLoopPoint: Sets music loop point, will return true if successful, false if not

S_GetMusicLoopPoint: Gets music loop point

S_PauseMusic: Pauses music

S_ResumeMusic Resumes music paused

A MusicChange hook was also added, allowing more control of what happens during a music change. Has a signature of string oldmusic, string newmusic, int flags, boolean looping, int postion, int prefadems, int fadeinms

Merge request reports

Loading