Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dummyenemy_Draw_0

(view raw script w/o annotations or w/e)
1
if (state == 3)
2
{
3
    global.monsterstatus[myself] = 1;
4
    if (global.monstercomment[myself] == " ")
5
        global.monstercomment[myself] = "(Tired)";
6
    hurttimer -= 1;
7
    if (hurttimer < 0)
8
    {
9
        state = 0;
10
    }
11
    else
12
    {
13
        if (global.monster[myself] == 0)
14
        {
15
        }
16
        hurtshake += 1;
17
        if (hurtshake > 1)
18
        {
19
            if (shakex > 0)
20
                shakex -= 1;
21
            if (shakex < 0)
22
                shakex += 1;
23
            shakex = -shakex;
24
            hurtshake = 0;
25
        }
26
        draw_sprite_ext(sprite_index, 0, x + shakex, y, 2, 2, 0, image_blend, 1);
27
    }
28
}
29
if (state == 0)
30
{
31
    siner += 1;
32
    thissprite = sprite_index;
33
    if (global.mercymod[myself] >= global.mercymax[myself])
34
        thissprite = sprite_index;
35
    draw_sprite_ext(thissprite, siner / 5, x, y, 2, 2, 0, image_blend, 1);
36
    if (flash == 1)
37
    {
38
        fsiner += 1;
39
        d3d_set_fog(true, c_white, 0, 1);
40
        draw_sprite_ext(thissprite, siner / 5, x, y, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6);
41
        d3d_set_fog(false, c_black, 0, 0);
42
    }
43
}
44
if (becomeflash == 0)
45
    flash = 0;
46
becomeflash = 0;