Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_blocked_total_fx_Draw_0

(view raw script w/o annotations or w/e)
1
if (state == 1)
2
{
3
    draw_self();
4
    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");
5
    draw_set_color(c_black);
6
    draw_set_halign(fa_center);
7
    if (global.lang == "ja")
8
    {
9
        draw_text(x, y - 6, string(count));
10
        draw_text(x, y + 8, stringsetloc(
Blocked
"Blocked", "obj_blocked_total_fx_slash_Draw_0_gml_9_0"
) + stringsetloc(
ads!
" ads!", "obj_blocked_total_fx_slash_Draw_0_gml_10_0"
));
11
    }
12
    else
13
    {
14
        draw_text(x, y - 6, stringsetloc(
Blocked
"Blocked", "obj_blocked_total_fx_slash_Draw_0_gml_9_0"
));
15
        draw_text(x, y + 8, string(count) + stringsetloc(
ads!
" ads!", "obj_blocked_total_fx_slash_Draw_0_gml_10_0"
));
16
    }
17
    draw_set_halign(fa_left);
18
    draw_set_color(c_white);
19
    con = 1;
20
}
21
else if (state < 3)
22
{
23
    if (state == -1)
24
    {
25
        scale += 0.25;
26
        if (scale > 1)
27
        {
28
            scale = 1.2;
29
            state = 0;
30
        }
31
    }
32
    else if (state == 0)
33
    {
34
        scale = 1;
35
        state = 1;
36
    }
37
    else if (state == 2)
38
    {
39
        scale -= 0.25;
40
        if (scale <= 0)
41
            instance_destroy();
42
    }
43
    draw_set_alpha(0.5);
44
    draw_set_color(c_black);
45
    draw_rectangle((x - (sprite_width / 2)) + 6, (y - (sprite_height / 2)) + 6, x + (sprite_width / 2) + 6, y + (sprite_height / 2) + 6, false);
46
    draw_set_alpha(1);
47
    draw_set_color(c_white);
48
    draw_sprite_ext(sprite_index, 0, x, y, scale, scale, 0, c_white, 1);
49
}
50
if (con == 1)
51
    image_alpha -= 0.4;
52
if (image_alpha < 0)
53
    instance_destroy();