Deltarune (Chapter 3) script viewer

← back to main script listing

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