Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_sheary_enemy_Draw_0

related scripts: Alarm_4Create_0Draw_0 Other_20Other_22Step_0

(view raw script w/o annotations or w/e)
1
if (i_ex(obj_scissors_act_controller))
2
{
3
    if (saloncut == true)
4
        d_rectangle_color(camerax() + 258, cameray() + 290, camerax() + 258 + lerp(140, 0, obj_scissors_act_controller.acttimer / obj_scissors_act_controller.acttimermax), cameray() + 300, 16776960, 16776960, 16776960, 16776960, 0);
5
    if (valuecut == true)
6
        d_rectangle_color(camerax() + 258, cameray() + 290, camerax() + 258 + lerp(140, 0, obj_scissors_act_controller.acttimer / obj_scissors_act_controller.acttimermax), cameray() + 300, 16776960, 16776960, 16776960, 16776960, 0);
7
    if (hypercut == true)
8
        d_rectangle_color(camerax() + 258, cameray() + 290, camerax() + 258 + lerp(140, 0, obj_scissors_act_controller.acttimer / obj_scissors_act_controller.acttimermax), cameray() + 300, 16776960, 16776960, 16776960, 16776960, 0);
9
    draw_sprite_ext(spr_poppup_hourglass, 0, camerax() + 240, cameray() + 295, 2, 2, 0, c_white, image_alpha);
10
}
11
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); }
();
12
if (custom_draw_example == 0)
13
{
14
    
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);
15
}
16
else if (state == 0)
17
{
18
    if (flash == 1)
19
        fsiner++;
20
    siner += 0.16666666666666666;
21
    if (global.mercymod[myself] >= global.mercymax[myself])
22
    {
23
        draw_monster_body_part(sparedsprite, siner, x, y);
24
    }
25
    else
26
    {
27
        draw_monster_body_part(spr_diamondm_custom_body_example, 1, x + (sin(siner) * 2), y);
28
        draw_monster_body_part(spr_diamondm_custom_body_example, 0, x - (sin(siner) * 2), y + cos(siner));
29
    }
30
}
31
if (becomeflash == 0)
32
    flash = 0;
33
becomeflash = 0;
34
var _cutstring = stringsetloc(
CUT!!!
"CUT!!!", "obj_sheary_enemy_slash_Draw_0_gml_46_0"
);
35
if (cuttextcon == 1)
36
{
37
    cuttexttimer--;
38
    var shakedir = -1;
39
    if ((cuttexttimer % 2) == 0)
40
        shakedir = 1;
41
    draw_set_halign(fa_center);
42
    
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("main");
43
    draw_text_ext_transformed_color(camerax() + (camerawidth() / 2) + (shakedir * cuttexttimer * 0.2), (cameray() + (cameraheight() / 2)) - 120, _cutstring, 99999, 99999, 3, 3, 0, 16777215, 16777215, 16777215, 16777215, 1);
44
    draw_set_halign(fa_left);
45
    if (cuttexttimer == 0)
46
        cuttextcon = 2;
47
}
48
if (cuttextcon == 2)
49
{
50
    cuttexttimer++;
51
    draw_set_halign(fa_center);
52
    
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("main");
53
    draw_text_ext_transformed_color(camerax() + (camerawidth() / 2), (cameray() + (cameraheight() / 2)) - 120, _cutstring, 99999, 99999, 3, 3, 0, 16777215, 16777215, 16777215, 16777215, lerp(1, 0, cuttexttimer / 30));
54
    draw_set_halign(fa_left);
55
    if (cuttexttimer == 30)
56
        cuttextcon = 0;
57
}