Deltarune (Chapter 4) script viewer

← back to main script listing

gml_GlobalScript_scr_rhythmgame_score_save

(view raw script w/o annotations or w/e)
1
function 
scr_rhythmgame_score_save
scr_rhythmgame_score_save

function
scr_rhythmgame_score_save(arg0, arg1, arg2 = false, arg3 = 0, arg4 = true)
{ if (arg3 == 0) arg3 =
scr_rhythmgame_song_flag(arg0, arg2);
if (!arg4 || arg1 >= global.flag[arg3]) global.flag[arg3] = arg1; }
(arg0, arg1, arg2 = false, arg3 = 0, arg4 = true)
2
{
3
    if (arg3 == 0)
4
        arg3 = 
scr_rhythmgame_song_flag
scr_rhythmgame_song_flag

function
scr_rhythmgame_song_flag(arg0, arg1)
{ if (arg0 == 2) return arg1 ? 1667 : 1666; else if (arg0 == 10) return arg1 ? 1669 : 1668; else return arg1 ? 1279 : 1195; }
(arg0, arg2);
5
    if (!arg4 || arg1 >= global.flag[arg3])
6
        global.flag[arg3] = arg1;
7
}