Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_cutscene_audio_fade

(view raw script w/o annotations or w/e)
1
function cutscene_audio_fade() //gml_Script_cutscene_audio_fade
2
{
3
    audio_sound_gain(argument[0], argument[1], argument[2])
4
    if (argument[4] == false)
5
    {
6
        if (audio_sound_get_gain(argument[0]) <= argument[3])
7
        {
8
            cutscene_advance()
9
            if (argument_count > 5 && argument[5] == true)
10
                audio_stop_sound(argument[0])
11
            return true;
12
        }
13
    }
14
    else if (audio_sound_get_gain(argument[0]) >= argument[3])
15
    {
16
        cutscene_advance()
17
        if (argument_count > 5 && argument[5] == true)
18
            audio_stop_sound(argument[0])
19
        return true;
20
    }
21
    return false;
22
}