Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_credits_ch5_audio_Step_0

(view raw script w/o annotations or w/e)
1
if (!_active)
2
    exit;
3
if (
scr_debug
scr_debug

function
scr_debug()
{ return global.debug == 1; }
())
4
{
5
    if (sunkus_kb_check_pressed(ord("R")))
6
    {
7
        snd_free_all();
8
        room_restart();
9
    }
10
    if (sunkus_kb_check_pressed(vk_space))
11
    {
12
        if (!paused)
13
        {
14
            paused = true;
15
            audio_pause_all();
16
        }
17
        else
18
        {
19
            paused = false;
20
            audio_resume_all();
21
        }
22
    }
23
}
24
if (paused)
25
    exit;
26
_timer++;
27
if (_timer >= round(_time_stamps[_time_stamp_index] * 30))
28
{
29
    if (_time_stamp_index < (array_length(_time_stamps) - 1))
30
    {
31
        _time_stamp_index++;
32
        emit_event("timestamp_changed");
33
    }
34
    else
35
    {
36
        _active = false;
37
        emit_event("credits_finished");
38
    }
39
}