Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_bq_laser_horizontal_telegraph_Draw_0

(view raw script w/o annotations or w/e)
1
timer++;
2
if (dir == 1)
3
{
4
    draw_set_alpha(1);
5
    draw_set_color(c_red);
6
    if (flash == 1)
7
        draw_set_color(c_white);
8
    draw_rectangle(x, y, x + 460, y + 60, true);
9
    draw_rectangle(x + 1, y + 1, x + 461, y + 61, true);
10
}
11
if (dir == -1)
12
{
13
    draw_set_alpha(1);
14
    draw_set_color(c_red);
15
    if (flash == 1)
16
        draw_set_color(c_white);
17
    draw_rectangle(x, y, x - 460, y + 60, true);
18
    draw_rectangle(x + 1, y + 1, x - 461, y + 61, true);
19
}
20
if (timer >= 2 && timer < 6)
21
{
22
    with (obj_bq_laser_exclamation_point)
23
    {
24
        if (image_blend == c_white)
25
            image_blend = c_red;
26
        else
27
            image_blend = c_white;
28
    }
29
    if (flash == 0)
30
        flash = 1;
31
    else
32
        flash = 0;
33
}
34
if (timer == 6)
35
{
36
    with (obj_bq_laser_exclamation_point)
37
    {
38
        state = 2;
39
        image_speed = 0;
40
    }
41
}
42
if (timer > 6 && !instance_exists(obj_bq_laser_exclamation_point))
43
    instance_destroy();