Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_pippins_enemy_Draw_0

(view raw script w/o annotations or w/e)
1
if (attackanim == true)
2
{
3
    if (attackanimcon == 0)
4
    {
5
        attackanimtimer++;
6
        attackanimindex += (2/3);
7
        if (attackanimindex > 3)
8
            attackanimindex = 3;
9
        if (attackanimtimer == 1)
10
        {
11
            speed = 10;
12
            friction = 1;
13
            snd_stop(snd_wing);
14
            snd_play(snd_wing);
15
        }
16
        if (attackanimtimer == 10)
17
        {
18
            attackanimtimer = 0;
19
            attackanimcon = 1;
20
        }
21
        draw_sprite_ext(spr_pippins_prepare, attackanimindex, x, y, 2, 2, 0, c_white, 1);
22
    }
23
    if (attackanimcon == 1)
24
    {
25
        attackanimtimer++;
26
        attackanimindex += (2/3);
27
        if (attackanimtimer == 3)
28
        {
29
            speed = -10;
30
            friction = 1;
31
        }
32
        if (global.turntimer < 1)
33
        {
34
            attackanimtimer = 0;
35
            attackanimcon = 2;
36
        }
37
        if (attackanimindex >= 6)
38
        {
39
            var rand = choose(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3);
40
            var spinsprite = 3701;
41
            draw_sprite_ext(spinsprite, attackanimindex, x, y, 2, 2, 0, c_white, 1);
42
        }
43
        else
44
        {
45
            draw_sprite_ext(spr_pippins_prepare, attackanimindex, x, y, 2, 2, 0, c_white, 1);
46
        }
47
    }
48
    if (attackanimcon == 2)
49
    {
50
        attackanimcon = 0;
51
        attackanim = false;
52
        x = xstart;
53
    }
54
}
55
if (attackanim == false)
56
{
57
    var _image_speed = 0.25;
58
    if (global.mercymod[myself] >= global.mercymax[myself])
59
        _image_speed = 1/3;
60
    
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); }
();
61
    
scr_enemy_drawidle_generic
scr_enemy_drawidle_generic

function
scr_enemy_drawidle_generic(arg0)
{ if (state == 0) { fsiner += 1; siner += arg0; thissprite = idlesprite; if (global.mercymod[myself] >= global.mercymax[myself]) thissprite = sparedsprite; draw_monster_body_part(thissprite, siner, x, y); } }
(_image_speed);
62
}
63
if (becomeflash == 0)
64
    flash = 0;
65
becomeflash = 0;