Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_lanino_rematch_enemy_Draw_0

(view raw script w/o annotations or w/e)
1
preset = 0;
2
shouldersx = x + 40;
3
shouldersy = y + 56;
4
shoulderflameindex += 0.125;
5
legsx = x + 42;
6
legsy = y + 122;
7
chestx = x + 40;
8
chesty = y + 76;
9
headx = x + 48;
10
heady = y + 50;
11
leftarmx = x + 34;
12
leftarmy = y + 58;
13
animsiner++;
14
laughtimer--;
15
if (laughtimer == 0)
16
{
17
    talking = 0;
18
    head = 1271;
19
}
20
if (preset == 0)
21
{
22
    var boby = abs(sin(animsiner / 6) * -2) * -1;
23
    if (pose == 3)
24
    {
25
        chesty += (boby * 0.5);
26
        shouldersy += (boby * 0.5);
27
    }
28
    else
29
    {
30
        chesty += (boby * 1.5);
31
        shouldersy += (boby * 1.5);
32
    }
33
    leftarmy += (-7 + (boby * 4));
34
    heady += (boby * 0.5);
35
}
36
lefthandx = leftarmx - 24;
37
lefthandy = leftarmy + 12;
38
if (state == 0)
39
{
40
    fsiner += 1;
41
    if (talking == false)
42
        talkingframe = 0;
43
    if (talking == true)
44
        talkingframe += 0.16666666666666666;
45
    if (pose == 0)
46
    {
47
        draw_sprite_ext(leftarm, 0, leftarmx, leftarmy, 2, 2, 0, image_blend, image_alpha);
48
        draw_sprite_ext(legs, 0, legsx, legsy, 2, 2, 0, image_blend, image_alpha);
49
        draw_sprite_ext(chest, chestindex, chestx, chesty, 2, 2, 0, image_blend, image_alpha);
50
        draw_sprite_ext(shoulders, shoulderflameindex, shouldersx, shouldersy, 2, 2, 0, image_blend, image_alpha);
51
        draw_sprite_ext(head, talkingframe, headx, heady, 2, 2, 0, image_blend, image_alpha);
52
        draw_sprite_ext(lefthand, 0, lefthandx, lefthandy, 2, 2, 0, image_blend, image_alpha);
53
        if (flash == 1)
54
        {
55
            draw_sprite_ext_flash(leftarm, 0, leftarmx, leftarmy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
56
            draw_sprite_ext_flash(legs, 0, legsx, legsy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
57
            draw_sprite_ext_flash(chest, chestindex, chestx, chesty, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
58
            draw_sprite_ext_flash(shoulders, shoulderflameindex, shouldersx, shouldersy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
59
            draw_sprite_ext_flash(head, talkingframe, headx, heady, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
60
            draw_sprite_ext_flash(lefthand, 0, lefthandx, lefthandy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
61
        }
62
    }
63
    if (pose == 1)
64
    {
65
        if (poseindex >= 2)
66
            poseindex = 0;
67
        if (poseindex < 1.5)
68
            poseindex += 0.25;
69
        draw_sprite_ext(head, talkingframe, headx - 8, heady + 13, 2, 2, 0, image_blend, image_alpha);
70
        draw_sprite_ext(spr_lanino_cool2, poseindex, legsx, legsy, 2, 2, 0, image_blend, image_alpha);
71
    }
72
    if (pose == 2)
73
    {
74
        if (poseindex < 2)
75
            poseindex = 2;
76
        if (poseindex < 3)
77
            poseindex += 0.25;
78
        draw_sprite_ext(head, talkingframe, headx - 8, heady + 13, 2, 2, 0, image_blend, image_alpha);
79
        draw_sprite_ext(spr_lanino_cool2, poseindex, legsx, legsy, 2, 2, 0, image_blend, image_alpha);
80
    }
81
    if (pose == 3)
82
    {
83
        draw_sprite_ext(leftarm, 0, leftarmx, leftarmy, 2, 2, 0, image_blend, image_alpha);
84
        draw_sprite_ext(legs, 0, legsx, legsy, 2, 2, 0, image_blend, image_alpha);
85
        draw_sprite_ext(chest, chestindex, chestx, chesty, 2, 2, 0, image_blend, image_alpha);
86
        draw_sprite_ext(shoulders, shoulderflameindex, shouldersx, shouldersy, 2, 2, 0, image_blend, image_alpha);
87
        draw_sprite_ext(head, talkingframe, headx, heady, 2, 2, 0, image_blend, image_alpha);
88
        draw_sprite_ext(lefthand, 0, lefthandx, lefthandy, 2, 2, 0, image_blend, image_alpha);
89
        draw_sprite_ext(spr_enemy_lanino_removeglasses_front, chestindex, chestx, chesty, 2, 2, 0, image_blend, image_alpha);
90
    }
91
}
92
if (state == 3 && hurttimer >= 0)
93
    draw_sprite_ext(hurtsprite, 0, x + shakex, y, 2, 2, 0, image_blend, 1);
94
if (becomeflash == 0)
95
{
96
    flash = 0;
97
}
98
else
99
{
100
    becomeflash--;
101
    flash = 1;
102
}