Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_elnina_rematch_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
laughtimer--;
18
if (laughtimer == 0)
19
{
20
    talking = 0;
21
    head = 4845;
22
}
23
if (preset == 0)
24
{
25
    hairx += (sin(animsiner / 12) * 2);
26
    var boby = abs(sin(animsiner / 6) * -2) * -1;
27
    hairy += (boby * 1.5);
28
    heady += boby;
29
    leftarmy += (boby * 4);
30
    if (pose == 3)
31
        rightarmy += boby;
32
    else
33
        rightarmy += (boby * 1.5);
34
    skirty += boby;
35
}
36
lefthandx = leftarmx - 24;
37
lefthandy = leftarmy + 4;
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(hairtufts, 0, hairx, hairy, 2, 2, 0, image_blend, 1);
48
        draw_sprite_ext(leftarm, 0, leftarmx, leftarmy, 2, 2, 0, image_blend, 1);
49
        draw_sprite_ext(waist, 0, waistx, waisty, 2, 2, 0, image_blend, 1);
50
        draw_sprite_ext(skirt, 0, skirtx, skirty, 2, 2, 0, image_blend, 1);
51
        draw_sprite_ext(rightarm, rightarmindex, rightarmx, rightarmy, 2, 2, 0, image_blend, 1);
52
        draw_sprite_ext(head, talkingframe, headx, heady, 2, 2, 0, image_blend, 1);
53
        draw_sprite_ext(lefthand, 0, lefthandx, lefthandy, 2, 2, 0, image_blend, 1);
54
        if (flash == 1)
55
        {
56
            draw_sprite_ext_flash(hairtufts, 0, hairx, hairy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
57
            draw_sprite_ext_flash(leftarm, 0, leftarmx, leftarmy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
58
            draw_sprite_ext_flash(waist, 0, waistx, waisty, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
59
            draw_sprite_ext_flash(skirt, 0, skirtx, skirty, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
60
            draw_sprite_ext_flash(rightarm, rightarmindex, rightarmx, rightarmy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
61
            draw_sprite_ext_flash(head, talkingframe, headx, heady, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
62
            draw_sprite_ext_flash(lefthand, 0, lefthandx, lefthandy, 2, 2, 0, flashcolor, (-cos(fsiner / 5) * 0.4) + 0.6);
63
        }
64
    }
65
    if (pose == 1)
66
    {
67
        if (poseindex >= 2)
68
            poseindex = 0;
69
        if (poseindex < 1.5)
70
            poseindex += 0.25;
71
        draw_sprite_ext(head, talkingframe, headx + 2, heady, 2, 2, 0, image_blend, image_alpha);
72
        draw_sprite_ext(spr_elnina_cool2, poseindex, waistx, waisty, 2, 2, 0, image_blend, image_alpha);
73
    }
74
    if (pose == 2)
75
    {
76
        if (poseindex < 2)
77
            poseindex = 2;
78
        if (poseindex < 3)
79
            poseindex += 0.25;
80
        draw_sprite_ext(head, talkingframe, headx, heady, 2, 2, 0, image_blend, image_alpha);
81
        draw_sprite_ext(spr_elnina_cool2, poseindex, waistx, waisty, 2, 2, 0, image_blend, image_alpha);
82
    }
83
    if (pose == 3)
84
    {
85
        draw_sprite_ext(hairtufts, 0, hairx, hairy, 2, 2, 0, c_white, 1);
86
        draw_sprite_ext(leftarm, 0, leftarmx, leftarmy, 2, 2, 0, c_white, 1);
87
        draw_sprite_ext(waist, 0, waistx, waisty, 2, 2, 0, c_white, 1);
88
        draw_sprite_ext(skirt, 0, skirtx, skirty, 2, 2, 0, c_white, 1);
89
        draw_sprite_ext(head, talkingframe, headx, heady, 2, 2, 0, c_white, 1);
90
        draw_sprite_ext(lefthand, 0, lefthandx, lefthandy, 2, 2, 0, c_white, 1);
91
        draw_sprite_ext(rightarm, rightarmindex, rightarmx, rightarmy, 2, 2, 0, c_white, 1);
92
    }
93
}
94
if (becomeflash == 0)
95
{
96
    flash = 0;
97
}
98
else
99
{
100
    becomeflash--;
101
    flash = 1;
102
}