Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_audio_sudden_stop_helper_Step_0

(view raw script w/o annotations or w/e)
1
if (audio_stop == true)
2
{
3
    if (current_pitch == -1)
4
        current_pitch = 1
5
    current_pitch -= fade_strength
6
    audio_sound_pitch(audio_to_fade, ((floor(current_pitch * 100)) / 100))
7
    if (current_pitch < 0.1)
8
    {
9
        audio_sound_pitch(audio_to_fade, 0)
10
        audio_pause_sound(audio_to_fade)
11
        instance_destroy()
12
    }
13
}
14
else
15
{
16
    if (current_pitch == -1)
17
        current_pitch = 0
18
    current_pitch += fade_strength
19
    audio_sound_pitch(audio_to_fade, ((floor(current_pitch * 100)) / 100))
20
    if (current_pitch >= 0.9)
21
    {
22
        audio_sound_pitch(audio_to_fade, 1)
23
        instance_destroy()
24
    }
25
}