Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_jigsawryenemy_Draw_0

(view raw script w/o annotations or w/e)
1
if (state == 3)
2
{
3
    global.mercymod[myself] = 0;
4
    traitorp = 1;
5
    global.flag[20 manual_face_sprite] = 1;
6
    with (obj_jigsawryenemy)
7
    {
8
        if (traitorp == 0)
9
            traitorp = 2;
10
        global.mercymod[myself] = 0;
11
    }
12
    if (global.monsterhp[myself] <= (global.monstermaxhp[myself] - 20))
13
    {
14
        global.monsterstatus[myself] = 1;
15
        if (global.monstercomment[myself] == " ")
16
            global.monstercomment[myself] = 
(Tired)
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_jigsawryenemy_slash_Draw_0_gml_15_0")
;
17
    }
18
    hurttimer -= 1;
19
    if (hurttimer < 0)
20
    {
21
        state = 0;
22
    }
23
    else
24
    {
25
        if (global.monster[myself] == 0)
26
            scr_defeatrun
scr_defeatrun

function scr_defeatrun() { defeatanim = instance_create(x, y, obj_defeatanim); defeatanim.sprite_index = sprite_index; defeatanim.sprite_index = hurtsprite; defeatanim.image_index = 0; defeatanim.image_xscale = image_xscale; defeatanim.image_yscale = image_yscale; instance_destroy(); }
();
27
        hurtshake += 1;
28
        if (hurtshake > 1)
29
        {
30
            if (shakex > 0)
31
                shakex -= 1;
32
            if (shakex < 0)
33
                shakex += 1;
34
            shakex = -shakex;
35
            hurtshake = 0;
36
        }
37
        draw_sprite_ext(hurtsprite, 0, x + shakex, y, 2, 2, 0, image_blend, 1);
38
    }
39
}
40
if (state == 0)
41
{
42
    siner += 1;
43
    thissprite = idlesprite;
44
    if (global.mercymod[myself] >= global.mercymax[myself])
45
        thissprite = sparedsprite;
46
    if (global.flag[20 manual_face_sprite] == 1)
47
        thissprite = hurtsprite;
48
    draw_sprite_ext(thissprite, siner / 6, x, y, 2, 2, 0, image_blend, 1);
49
    if (flash == 1)
50
    {
51
        fsiner += 1;
52
        d3d_set_fog(true, c_white, 0, 1);
53
        draw_sprite_ext(thissprite, siner / 6, x, y, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6);
54
        d3d_set_fog(false, c_black, 0, 0);
55
    }
56
}
57
if (becomeflash == 0)
58
    flash = 0;
59
becomeflash = 0;