Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shootout_tenna_test_Draw_0

(view raw script w/o annotations or w/e)
1
if (conc == 0)
2
{
3
    timerc++;
4
    if (timerc < 16)
5
    {
6
        yextra = lerp(-20, 0, timerc / 15);
7
        y = lerp(y, (ystart - 52) + yextra, timerc / 15);
8
        headangle = lerp(-15, 0, timerc / 15);
9
        bodyangle = lerp(-10, 0, timerc / 15);
10
    }
11
    yextra = lerp(-20, 0, timerc / 15);
12
    armangle = lerp(armangle, -10, timerc / 20);
13
    if (timerc == 21)
14
    {
15
        a = 0;
16
        b = 0;
17
        conc = 1;
18
        timerc = 0;
19
    }
20
}
21
if (conc == 1)
22
{
23
    timerc++;
24
    if (timerc == 10)
25
    {
26
        conc = 2;
27
        timerc = 0;
28
    }
29
}
30
if (conc == 2)
31
{
32
    timerc++;
33
    if (timerc == 1)
34
    {
35
        armindex = 1;
36
        armangle = -15;
37
        snd_play_x(snd_gunshot, 1, 1.3);
38
    }
39
    if (timerc == 2)
40
    {
41
        armindex = 0;
42
        armangle = -80;
43
        headangle = 15;
44
        bodyangle = 15;
45
        snd_play_x(snd_gunshot, 1, 1.3);
46
    }
47
    headangle = lerp(headangle, 0, timerc / 15);
48
    bodyangle = lerp(bodyangle, 0, timerc / 15);
49
    armangle = lerp(armangle, 0, timerc / 15);
50
    if (timerc == 10)
51
    {
52
        conc = 4;
53
        timerc = 0;
54
    }
55
}
56
if (conc == 3)
57
{
58
    timerc++;
59
    y = lerp(y, ystart, timerc / 10);
60
    if (timerc == 10)
61
        instance_destroy();
62
}
63
if (conc == 4)
64
{
65
    timerc++;
66
    if (timerc == 1)
67
    {
68
        headangle = -20;
69
        bodyangle = -20;
70
        armangle = -10;
71
        x = xstart + 6;
72
    }
73
    if (timerc == 2)
74
        x = xstart - 5;
75
    if (timerc == 3)
76
        x = xstart + 4;
77
    if (timerc == 4)
78
        x = xstart - 3;
79
    if (timerc == 5)
80
        x = xstart + 2;
81
    if (timerc == 6)
82
        x = xstart - 1;
83
    if (timerc == 7)
84
        x = xstart;
85
    if (timerc > 15)
86
        y = lerp(y, ystart, (timerc - 15) / 10);
87
    if (timerc == 26)
88
        instance_destroy();
89
}
90
draw_sprite_ext(spr_shootout_tenna_shoot_pieces, 0, x, y, scale, scale, headangle, image_blend, 1);
91
draw_sprite_ext(spr_shootout_tenna_shoot_pieces, 1, x, y, scale, scale, bodyangle, image_blend, 1);
92
draw_sprite_ext(spr_shootout_tenna_shoot_pieces2, armindex, x + (8 * scale), y + (6 * scale), scale, scale, armangle, image_blend, 1);