-
Notifications
You must be signed in to change notification settings - Fork 3
State functions
Functions for modifying MusicAPI.State
. You should read How MusicAPI states work if you haven't already.
For all functions, any string argument may be omitted and a default will be used instead.
MusicAPI.StartBossState(string|boolean start_jingle, string theme, string end_jingle)
Sets MusicAPI to treat the current room like a boss fight. If start_jingle is false or nil, then it will be skipped and the boss theme will play straight away. If it is true, a default will be used. This behaviour is the same for all start_jingle arguments in all boss state functions.
Plays the boss theme when the room starts (after the cutscene) and plays the end jingle when the boss has been killed.
Bosses have to be in the room, or else the state will jump straight to the boss defeat jingle.
MusicAPI.StartSatanBossState(string|boolean start_jingle, string theme_inactive, string theme_phase1, string theme_phase2, string end_jingle)
MusicAPI.StartMegaSatanBossState(string|boolean start_jingle, string theme_inactive, string theme_main, string end_jingle)
MusicAPI.StartDogmaBossState(string|boolean intro_theme, theme_main, end_jingle)
MusicAPI.StartAngelBossState(string theme, string end_jingle)
Angel boss state only advances to the next phase if an angel statue effect is removed on the same frame. The state will instantly be cleared otherwise.
MusicAPI.StartUltraGreedBossState(string|boolean start_jingle, string theme_main, string end_jingle)
Waits for the room to clear instead of waiting for all bosses to die.
MusicAPI.StartMinibossState(string theme_main, string end_jingle)
MusicAPI.StartAmbushState(string ambush_theme, string ambush_end_jingle, boolean start_instantly)
Sets MusicAPI to treat the current room like an ambush (challenge room).
If start_instantly is false or nil, MusicAPI waits for Room_IsAmbushActive before starting, otherwise the ambush music is started straight away.
MusicAPI.StartGreedState(string enemy_theme, string enemy_end_jingle, string boss_theme, string boss_end_jingle, string final_boss_theme, string calm)
enemy_theme
is the music that plays while enemies are present. Can be nil for none. This is challenge music on The Shop stage.
MusicAPI.ClearState()
Clears MusicAPI's state. If used during a boss fight for example, the music will no longer dynamically change, and will remain the current track until a room change occurs.