Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shadow_mantle_bomb_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    if (con == 0)
4
    {
5
        snd_stop(snd_board_throw);
6
        snd_play_x(snd_board_throw, 0.7, 0.8);
7
    }
8
    init = 1;
9
}
10
if (con == 0)
11
{
12
    timer++;
13
    if (timer == 1)
14
    {
15
        timer = 0;
16
        con = 1;
17
        distancex = xstart - targetx;
18
        distancey = ystart - targety;
19
    }
20
    depth = -9999999999999;
21
    if (kris != 0)
22
        depth = kris.depth - 1;
23
}
24
if (con == 1)
25
{
26
    timer += 2;
27
    x = lerp(xstart, targetx, timer / 60);
28
    y = lerp(ystart, targety, timer / 60);
29
    fakey = -15 + (sin(timer / 19) * 100 * -1);
30
    if (timer == 60)
31
    {
32
        depth = savedepth;
33
        timer = 0;
34
        con = 2;
35
        snd_stop(snd_bump);
36
        snd_play(snd_bump);
37
    }
38
}
39
if (con == 2)
40
{
41
    
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
42
    timer++;
43
    if (timer > 10)
44
        image_index++;
45
    if (timer == 20)
46
    {
47
        cloud = instance_create((x - 16) + 4, y - 20 - 10, obj_shadow_mantle_cloud);
48
        cloud.type = type;
49
        cloud.depth = depth - 10;
50
        snd_stop(snd_board_bomb);
51
        snd_play(snd_board_bomb);
52
        instance_destroy();
53
    }
54
}