Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_scarecrow_enemy_Draw_0

related scripts: Alarm_4CleanUp_0Create_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
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); } }
(0.16666666666666666);
3
if (state == 10)
4
{
5
    state10timer++;
6
    if (state10timer == 1)
7
        x -= 4;
8
    if (state10timer == 2)
9
        x += 7;
10
    if (state10timer == 3)
11
        x -= 6;
12
    if (state10timer == 4)
13
        x += 5;
14
    if (state10timer == 5)
15
        x -= 4;
16
    if (state10timer == 6)
17
        x += 3;
18
    if (state10timer == 7)
19
        x -= 2;
20
    if (state10timer == 8)
21
        x += 1;
22
    if (state10timer == 9)
23
        x = xstart;
24
    draw_monster_body_part(spr_scarecrow_hurt, siner, x, y);
25
}
26
if (state == 11)
27
{
28
    draw_monster_body_part(spr_scarecrow_push, siner, x, y);
29
    state10timer++;
30
    if (state10timer < 9)
31
    {
32
        repeat (2)
33
        {
34
            d = instance_create(x + 26, y + 54, obj_shi_power_up_orb);
35
            d.direction = irandom(360);
36
            d.depth = depth + 1;
37
            d.image_blend = c_gray;
38
            d.lifetime = 10;
39
        }
40
    }
41
    if (state10timer == 20)
42
        state = 0;
43
}
44
if (becomeflash == 0)
45
    flash = 0;
46
becomeflash = 0;
47
if (acting == 101)
48
{
49
    d_rectangle_color(camerax() + 240, cameray() + 290, (camerax() + 240 + 180) - (blowtimer * 1.8), cameray() + 300, 16776960, 16776960, 16776960, 16776960, 0);
50
    draw_sprite_ext(spr_poppup_hourglass, 0, camerax() + 240, cameray() + 295, 2, 2, 0, c_white, image_alpha);
51
    d3d_set_fog(true, c_white, 0, 0);
52
    if (button3_p() == 1)
53
        draw_sprite_ext(spr_poppup_hourglass, floor((clocktimer / 10) * 7), camerax() + 240, cameray() + 295, 2, 2, 0, c_white, 0.4);
54
    d3d_set_fog(false, c_white, 0, 0);
55
}