Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_terracota_enemy_Draw_0

related scripts: Alarm_4Create_0Draw_0 Other_22Step_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
    if (flash == 1)
5
        fsiner++;
6
    siner += 0.16666666666666666;
7
    if (global.mercymod[myself] >= global.mercymax[myself])
8
    {
9
        draw_monster_body_part(sparedsprite, siner, x, y);
10
    }
11
    else
12
    {
13
        draw_monster_body_part(spr_terracotta_backpouldron, 0, x, y - (sin(siner) * 2));
14
        draw_monster_body_part(spr_terracotta_feet, 0, x, y);
15
        draw_monster_body_part(spr_terracotta_body, 0, x, y - (sin(siner) * 2));
16
        draw_sprite_ext(spr_terracotta_hands_shovel_centered, 0, (x + 90) - (sin(siner) * 1), ((y - (sin(siner) * 1)) + 94) - (sin(siner) * 2), 2, 2, image_angle - (sin(siner) * 4), image_blend, image_alpha);
17
        if (flash == 1)
18
            draw_sprite_ext_flash(spr_terracotta_hands_shovel_centered, 0, (x + 90) - (sin(siner) * 1), ((y - (sin(siner) * 1)) + 94) - (sin(siner) * 2), 2, 2, image_angle - (sin(siner) * 4), image_blend, (-cos(fsiner / 5) * 0.4) + 0.6);
19
        if (headballooncon == 1)
20
        {
21
            headballoontimer++;
22
            draw_sprite_ext(spr_terracotta_head_bloomed, 0, x, y - (sin(siner) * 1), 2, 2, 0, c_white, 1);
23
            if (headballoontimer <= 15)
24
            {
25
                gpu_set_fog(1, c_white, 0, 0);
26
                draw_sprite_ext(spr_terracotta_head_bloomed, 0, x, y - (sin(siner) * 1), 2, 2, 0, c_white, lerp(1, 0, headballoontimer / 15));
27
                gpu_set_fog(0, c_white, 0, 0);
28
            }
29
            if (headballoontimer == 8)
30
            {
31
                repeat (5)
32
                {
33
                    var marker = instance_create(x + 60 + irandom(40), y + 8 + irandom(10), obj_marker);
34
                    with (marker)
35
                    {
36
                        sprite_index = spr_dw_garden_cuttableflowerpetals;
37
                        direction = 170 + irandom(60);
38
                        speed = 1 + irandom(2);
39
                        friction = 0.01;
40
                        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
41
                        image_speed = random_range(0.2, 0.35);
42
                        depth = other.depth - 1;
43
                        
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ var _doom = instance_create_depth(0, 0, 0, obj_doom); with (_doom) { alarm[0] = arg1; target = arg0; } return _doom; }
(self, 60);
44
                        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("image_alpha", 1, 0, 60);
45
                    }
46
                }
47
            }
48
        }
49
        else
50
        {
51
            draw_monster_body_part(spr_terracotta_head_no_plant, 0, x, y - (sin(siner) * 1));
52
            draw_monster_body_part(spr_terracotta_head_plant, 0, x, y - (sin(siner) * 1));
53
        }
54
        draw_monster_body_part(spr_terracotta_hands_front_shoulder, 0, x, y - (sin(siner) * 2));
55
    }
56
}
57
if (becomeflash == 0)
58
    flash = 0;
59
becomeflash = 0;