Deltarune (Chapter 3) script viewer

← back to main script listing

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