Deltarune script viewer

← back to main script listing

gml_Object_obj_gameover_init_ch1_Step_0

(view raw script w/o annotations or w/e)
1
timer += 1;
2
if (timer == 1)
3
    snd_free_all_ch1();
4
if (timer == 30)
5
{
6
    with (bg)
7
        instance_destroy();
8
    visible = 1;
9
    x = global.heartx;
10
    y = global.hearty;
11
}
12
if (timer == 31)
13
    sprite_delete(global.screenshot);
14
if (timer == 50)
15
{
16
    snd_play_ch1(snd_break1_ch1);
17
    sprite_index = spr_heartbreak_ch1;
18
    x -= 2;
19
}
20
if (timer == 90)
21
{
22
    snd_play_ch1(snd_break2_ch1);
23
    visible = 0;
24
    sh[0] = instance_create_ch1(x - 2, y, obj_marker_ch1);
25
    sh[1] = instance_create_ch1(x, y + 3, obj_marker_ch1);
26
    sh[2] = instance_create_ch1(x + 2, y + 6, obj_marker_ch1);
27
    sh[3] = instance_create_ch1(x + 8, y, obj_marker_ch1);
28
    sh[4] = instance_create_ch1(x + 10, y + 3, obj_marker_ch1);
29
    sh[5] = instance_create_ch1(x + 12, y + 6, obj_marker_ch1);
30
    for (i = 0; i < 6; i += 1)
31
    {
32
        with (sh[i])
33
        {
34
            direction = random(360);
35
            speed = 7;
36
            gravity_direction = 270;
37
            gravity = 0.2;
38
            sprite_index = spr_heartshards_ch1;
39
            image_speed = 0.2;
40
        }
41
    }
42
    if (global.tempflag[3] >= 1)
43
        timer += 15;
44
}
45
if (timer == 140)
46
    instance_create_ch1(0, 0, obj_fadeout_ch1);
47
if (timer >= 80 && timer < 150)
48
{
49
    if (button1_p_ch1())
50
        Z_COUNT += 1;
51
    if (Z_COUNT >= 4)
52
        scr_tempload_ch1
scr_tempload_ch1

function scr_tempload_ch1() { filechoicebk3 = global.filechoice; global.filechoice = 9; scr_load_ch1(); global.filechoice = filechoicebk3; }
();
53
}
54
if (timer == 150)
55
    room_goto(PLACE_FAILURE_ch1 Game Over screen);