Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_bell_enemy_Draw_0

(view raw script w/o annotations or w/e)
1
scr_enemy_drawhurt_generic
scr_enemy_drawhurt_generic

function
scr_enemy_drawhurt_generic()
{ if (state == 3 && hurttimer >= 0) draw_sprite_ext(hurtsprite, 0, x + shakex + hurtspriteoffx, y + hurtspriteoffy, 2, 2, 0, image_blend, 1); }
();
2
if (state == 0)
3
{
4
    thissprite = idlesprite;
5
    fsiner++;
6
    animsiner++;
7
    if (global.mercymod[myself] >= global.mercymax[myself])
8
    {
9
        draw_monster_body_part(spr_bell_spare, 0, x + 3, y - 8);
10
    }
11
    else
12
    {
13
        draw_monster_body_part(thissprite, 6, x - (sin(animsiner / 3) * 2), y);
14
        draw_monster_body_part(thissprite, 5, x - (sin(animsiner / 6) * 2), y);
15
        draw_monster_body_part(thissprite, 4, x, y + (sin(animsiner / 6) * 2));
16
        draw_monster_body_part(thissprite, 3, x, y - (sin(animsiner / 6) * 2));
17
        draw_monster_body_part(thissprite, 2, x, y);
18
        draw_monster_body_part(thissprite, 1, x + (sin(animsiner / 6) * 2), y);
19
    }
20
}
21
if (state == 10)
22
{
23
    if (spinattackcon == 0)
24
    {
25
        spinattacktimer++;
26
        if (spinattacktimer == 1)
27
            draw_monster_body_part(spr_bell_enemy_spin_pose, 2, x, y - 4);
28
        if (spinattacktimer == 2)
29
            draw_monster_body_part(spr_bell_enemy_spin_pose, 2, x, y + 3);
30
        if (spinattacktimer == 3)
31
            draw_monster_body_part(spr_bell_enemy_spin_pose, 2, x, y - 2);
32
        if (spinattacktimer == 4)
33
            draw_monster_body_part(spr_bell_enemy_spin_pose, 2, x, y + 1);
34
        if (spinattacktimer >= 7 || spinattacktimer < 11)
35
            draw_monster_body_part(spr_bell_enemy_spin_pose, 2, x, y);
36
        if (spinattacktimer == 11)
37
        {
38
            spinattacktimer = 0;
39
            spinattackcon = 1;
40
            bell = instance_create(x + 41, y + 45, obj_bell_spin_attack);
41
            bell.creatorid = id;
42
        }
43
    }
44
    animsiner++;
45
    draw_monster_body_part(thissprite, 6, x - (sin(animsiner / 3) * 2), y);
46
    draw_monster_body_part(thissprite, 5, x - (sin(animsiner / 6) * 2), y);
47
    draw_monster_body_part(thissprite, 1, x + (sin(animsiner / 6) * 2), y);
48
}
49
if (becomeflash == 0)
50
    flash = 0;
51
becomeflash = 0;