Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_elnina_enemy_rouxls_Draw_0

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