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