Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_elnina_enemy_Draw_0

(view raw script w/o annotations or w/e)
1
if (state == 3 && hurttimer >= 0)
2
    draw_sprite_ext(spr_elnina_hurt2, 0, x + shakex, y - 7, 2, 2, 0, c_white, 1);
3
preset = 0;
4
hairx = x + 42;
5
hairy = y + 50;
6
waistx = x + 42;
7
waisty = y + 112;
8
rightarmx = x + 46;
9
rightarmy = y + 58;
10
headx = x + 44;
11
heady = y + 62;
12
leftarmx = x + 36;
13
leftarmy = y + 60;
14
skirtx = x + 42;
15
skirty = y + 70;
16
animsiner++;
17
if (preset == 0)
18
{
19
    hairx += (sin(animsiner / 12) * 2);
20
    var boby = abs(sin(animsiner / 6) * -2) * -1;
21
    hairy += (boby * 1.5);
22
    heady += boby;
23
    leftarmy += (boby * 4);
24
    if (pose == 3)
25
        rightarmy += boby;
26
    else
27
        rightarmy += (boby * 1.5);
28
    skirty += boby;
29
}
30
lefthandx = leftarmx - 24;
31
lefthandy = leftarmy + 4;
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(hairtufts, 0, hairx, hairy, 2, 2, 0, image_blend, 1);
42
        draw_sprite_ext(leftarm, 0, leftarmx, leftarmy, 2, 2, 0, image_blend, 1);
43
        draw_sprite_ext(waist, 0, waistx, waisty, 2, 2, 0, image_blend, 1);
44
        draw_sprite_ext(skirt, 0, skirtx, skirty, 2, 2, 0, image_blend, 1);
45
        draw_sprite_ext(rightarm, rightarmindex, rightarmx, rightarmy, 2, 2, 0, image_blend, 1);
46
        draw_sprite_ext(head, talkingframe, headx, heady, 2, 2, 0, image_blend, 1);
47
        draw_sprite_ext(lefthand, 0, lefthandx, lefthandy, 2, 2, 0, image_blend, 1);
48
        if (flash == 1)
49
        {
50
            draw_sprite_ext_flash(hairtufts, 0, hairx, hairy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
51
            draw_sprite_ext_flash(leftarm, 0, leftarmx, leftarmy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
52
            draw_sprite_ext_flash(waist, 0, waistx, waisty, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
53
            draw_sprite_ext_flash(skirt, 0, skirtx, skirty, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
54
            draw_sprite_ext_flash(rightarm, rightarmindex, rightarmx, rightarmy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
55
            draw_sprite_ext_flash(head, talkingframe, headx, heady, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
56
            draw_sprite_ext_flash(lefthand, 0, lefthandx, lefthandy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
57
        }
58
    }
59
    if (pose == 1)
60
    {
61
        if (poseindex >= 2)
62
            poseindex = 0;
63
        if (poseindex < 1.5)
64
            poseindex += 0.25;
65
        draw_sprite_ext(head, talkingframe, headx + 2, heady, 2, 2, 0, image_blend, image_alpha);
66
        draw_sprite_ext(spr_elnina_cool2, poseindex, waistx, waisty, 2, 2, 0, image_blend, image_alpha);
67
    }
68
    if (pose == 2)
69
    {
70
        if (poseindex < 2)
71
            poseindex = 2;
72
        if (poseindex < 3)
73
            poseindex += 0.25;
74
        draw_sprite_ext(head, talkingframe, headx, heady, 2, 2, 0, image_blend, image_alpha);
75
        draw_sprite_ext(spr_elnina_cool2, poseindex, waistx, waisty, 2, 2, 0, image_blend, image_alpha);
76
    }
77
    if (pose == 3)
78
    {
79
        draw_sprite_ext(hairtufts, 0, hairx, hairy, 2, 2, 0, c_white, 1);
80
        draw_sprite_ext(leftarm, 0, leftarmx, leftarmy, 2, 2, 0, c_white, 1);
81
        draw_sprite_ext(waist, 0, waistx, waisty, 2, 2, 0, c_white, 1);
82
        draw_sprite_ext(skirt, 0, skirtx, skirty, 2, 2, 0, c_white, 1);
83
        draw_sprite_ext(head, talkingframe, headx, heady, 2, 2, 0, c_white, 1);
84
        draw_sprite_ext(lefthand, 0, lefthandx, lefthandy, 2, 2, 0, c_white, 1);
85
        draw_sprite_ext(rightarm, rightarmindex, rightarmx, rightarmy, 2, 2, 0, c_white, 1);
86
    }
87
}
88
if (becomeflash == 0)
89
{
90
    flash = 0;
91
}
92
else
93
{
94
    becomeflash--;
95
    flash = 1;
96
}