Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_gameover_heart_effect_Step_0

(view raw script w/o annotations or w/e)
1
timer++;
2
if (timer == 1)
3
    snd_free_all();
4
if (timer == 30)
5
{
6
    image_alpha = 1;
7
    x = global.heartx;
8
    y = global.hearty;
9
    drawbg = true;
10
}
11
if (timer == 31)
12
    safe_delete(bg);
13
if (timer == 50)
14
{
15
    snd_play(snd_break1);
16
    sprite_index = spr_heartbreak;
17
    x -= 2;
18
}
19
if (timer == 90)
20
{
21
    snd_play(snd_break2);
22
    image_alpha = 0;
23
    sh[0] = instance_create(x - 2, y, obj_marker);
24
    sh[1] = instance_create(x, y + 3, obj_marker);
25
    sh[2] = instance_create(x + 2, y + 6, obj_marker);
26
    sh[3] = instance_create(x + 8, y, obj_marker);
27
    sh[4] = instance_create(x + 10, y + 3, obj_marker);
28
    sh[5] = instance_create(x + 12, y + 6, obj_marker);
29
    for (i = 0; i < 6; i += 1)
30
    {
31
        with (sh[i])
32
        {
33
            direction = random(360);
34
            speed = 7;
35
            gravity_direction = 270;
36
            gravity = 0.2;
37
            sprite_index = spr_heartshards;
38
            image_speed = 0.2;
39
            depth = other.depth - 10;
40
        }
41
    }
42
    if (global.tempflag[3] >= 1)
43
        timer += 15;
44
}
45
if (timer == 140)
46
    instance_create(0, 0, obj_fadeout);
47
if (timer >= 80)
48
{
49
    if (button1_p())
50
        timer += 18;
51
}
52
if (timer >= 150)
53
{
54
}
55
if (special == 1)
56
{
57
    if (timer >= 210)
58
    {
59
        room_goto(room_board_sword_intro);
60
        instance_create(0, 0, obj_persistentfadein);
61
    }
62
}