Undertale script viewer

← back to main script listing

gml_Object_obj_gigavine_preview_Draw_0

(view raw script w/o annotations or w/e)
1
if (active == 1)
2
{
3
    onoff += 1;
4
    if (onoff > 2)
5
        onoff = 0;
6
    if (onoff == 0)
7
        draw_set_color(c_red);
8
    if (onoff == 1)
9
        draw_set_color(c_orange);
10
    if (onoff == 2)
11
        draw_set_color(c_yellow);
12
    xxl = lengthdir_x(600, direction);
13
    yyl = lengthdir_y(600, direction);
14
    draw_line_width(x - 8, y, (x + xxl) - 8, y + yyl, 2);
15
    draw_line_width(x + 8, y, x + xxl + 8, y + yyl, 2);
16
    nowtime += 1;
17
    if (nowtime > maxtime)
18
    {
19
        image_angle = direction;
20
        gv = instance_create(x, y, obj_gigavine);
21
        gv.memorymode = memorymode;
22
        gv.image_angle = image_angle;
23
        if (memorymode == 0)
24
        {
25
            instance_destroy();
26
        }
27
        else
28
        {
29
            active = 0;
30
            visible = false;
31
        }
32
    }
33
}