Deltarune script viewer

← back to main script listing

gml_Object_obj_traffic_switch_Draw_0

(view raw script w/o annotations or w/e)
1
image_blend = c_white;
2
if (active == 1 && type == 1)
3
    image_index = 0;
4
if (active == 0)
5
    image_index = 0;
6
if (active == 1 && type == 0)
7
    image_index = 1;
8
draw_self();
9
blend = c_gray;
10
if (active == 1 && type == 1)
11
    blend = c_lime;
12
if (active == 1 && type == 0)
13
    blend = c_red;
14
if (active == 0 && clear_traffic)
15
    blend = c_lime;
16
timernumber = ceil(timer / timefactor);
17
draw_sprite_ext(spr_trafficswitch_symbol, type, x, y, 2, 2, 0, blend, image_alpha);
18
if (type != 2)
19
{
20
    timeNumber = clamp(timernumber, 0, 9);
21
    draw_sprite_ext(spr_numbersfontbig, timeNumber, x + 10, y + 14, 1, 1, 0, blend, 1);
22
}