Undertale script viewer

← back to main script listing

gml_Object_obj_floweypipetest_3_Draw_0

(view raw script w/o annotations or w/e)
1
if (frozen == 0)
2
    siner += 1;
3
if (flash == 0)
4
{
5
    image_blend = c_white;
6
    blend2 = 16777215;
7
}
8
if (flash == 1)
9
{
10
    draw_set_alpha(sin(siner / 3) / 2);
11
    draw_ellipse_color(x - 45, y + 40, x + 45, y - 40, c_green, c_black, 0);
12
    draw_set_alpha(1);
13
    image_blend = make_color_rgb(100 - (sin(siner / 3) * 100), 255, 100 - (sin(siner / 3) * 100));
14
}
15
if (flash == 2)
16
{
17
    draw_set_alpha(sin(siner / 3) / 2);
18
    draw_ellipse_color((x - 45) + op, y + 40, x + 45 + op, y - 40, c_yellow, c_black, 0);
19
    draw_set_alpha(1);
20
    blend2 = make_color_rgb(230, 230, 130 - (sin(siner / 3) * 120));
21
}
22
if (global.debug == 1)
23
{
24
    if (keyboard_check_pressed(ord("C")))
25
    {
26
        if (flash == 0)
27
        {
28
            flash = 2;
29
        }
30
        else
31
        {
32
            flash = 0;
33
            blend2 = 8421504;
34
        }
35
    }
36
    if (keyboard_check_pressed(ord("X")))
37
    {
38
        if (flash == 0)
39
        {
40
            flash = 1;
41
        }
42
        else
43
        {
44
            flash = 0;
45
            image_blend = c_gray;
46
        }
47
    }
48
}
49
for (i = 0; i < 16; i += 1)
50
{
51
    offx = x + (sin((i - 34) / 3) * 45);
52
    offy = y + (cos((i - 34) / 3) * 40) + (cos((i + siner) / 6) * 8);
53
    offs = sin((siner + (i * 4)) / 6) * 2;
54
    if (offs > 1)
55
        offs = (offs - 1) / 3;
56
    else
57
        offs = 0;
58
    if (global.soul_rescue < 5)
59
        draw_sprite_ext(sprite_index, image_index, offx, offy, 1 + offs, 1 + offs, (i * 20) + 50, image_blend, 1);
60
    else
61
        draw_sprite_ext(sprite_index, image_index, offx, offy, 1, 1, (i * 20) + 50, c_gray, 1);
62
}
63
for (i = 0; i < 16; i += 1)
64
{
65
    offx2 = (x - (sin((i - 34) / 3) * 45)) + op;
66
    offy2 = y + (cos((i - 34) / 3) * 40) + (cos((i + siner) / 6) * 8);
67
    offs2 = sin((siner + (i * 4)) / 6) * 2;
68
    if (offs2 > 1)
69
        offs2 = (offs2 - 1) / 3;
70
    else
71
        offs2 = 0;
72
    if (global.soul_rescue < 6)
73
        draw_sprite_ext(sprite_index, image_index, offx2, offy2, 1 + offs2, 1 + offs2, (i * -20) - 50, blend2, 1);
74
    else
75
        draw_sprite_ext(sprite_index, image_index, offx2, offy2, 1, 1, (i * -20) - 50, c_gray, 1);
76
}