Undertale script viewer

← back to main script listing

gml_Object_obj_iceteeth_Draw_0

(view raw script w/o annotations or w/e)
1
draw_set_color(c_white);
2
for (i = 0; (global.idealborder[0] + (i * 5)) < global.idealborder[1]; i += 1)
3
{
4
    toothyy[i] = y + (sin(seed + (i * factor)) * 30);
5
    toothxx[i] += toothspeed;
6
    if (toothxx[i] > global.idealborder[1])
7
        toothxx[i] = global.idealborder[0];
8
    if (toothxx[i] < global.idealborder[0])
9
        toothxx[i] = global.idealborder[0];
10
    if (toothyy[i] > global.idealborder[2])
11
        draw_line(toothxx[i], global.idealborder[2], toothxx[i], toothyy[i]);
12
    if ((toothyy[i] + toothdist) < global.idealborder[3])
13
        draw_line(toothxx[i], global.idealborder[3], toothxx[i], toothyy[i] + toothdist);
14
    if (collision_line(toothxx[i], global.idealborder[2], toothxx[i], toothyy[i] - 3, obj_heart, false, true))
15
        event_user(1);
16
    if (collision_line(toothxx[i], global.idealborder[3], toothxx[i], toothyy[i] + toothdist + 3, obj_heart, false, true))
17
        event_user(1);
18
}
19
toothdist -= (vspeed * 2.15);
20
if (toothspeed < 2.4)
21
    toothspeed += 0.08;