Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_countdown_Draw_0

(view raw script w/o annotations or w/e)
1
draw_set_color(c_black);
2
ossafe_fill_rectangle(-10, -10, room_width + 10, room_height + 10);
3
draw_set_color(c_white);
4
if (!is_init)
5
    exit;
6
if (!countdown)
7
    exit;
8
countdown_timer++;
9
if ((countdown_timer % 30) == 0)
10
{
11
    countdown_text--;
12
    if (countdown_text <= 0)
13
    {
14
        snd_play(snd_bell);
15
        countdown = false;
16
        alarm[0]
 = 30;
gml_Object_obj_dw_countdown_Alarm_0.gml

room_goto(target_room);
17
        exit;
18
    }
19
    else
20
    {
21
        snd_play_pitch(snd_orchhit, 1 + (orchhit_pitch / 16));
22
        orchhit_pitch++;
23
    }
24
}
25
draw_set_halign(fa_center);
26
draw_set_font(fnt_main);
27
draw_text_ext_transformed(camerax() + (view_wport[0] / 2), (cameray() + (view_hport[0] / 2)) - 50, string(countdown_text), 4, 9999, 6, 6, 0);
28
draw_set_halign(fa_left);