Undertale script viewer

← back to main script listing

gml_Object_obj_floweypipetest_2_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 - 85, y + 40, x + 85, y - 40, c_blue, c_black, 0);
12
    draw_set_alpha(1);
13
    image_blend = make_color_rgb(120 - ((sin(siner / 3) / 2) * 100), 120 - ((sin(siner / 3) / 2) * 100), 255);
14
}
15
if (flash == 2)
16
{
17
    draw_set_alpha(sin(siner / 3) / 2);
18
    draw_ellipse_color((x - 105) + op, y + 40, x + 85 + op, y - 40, c_fuchsia, c_black, 0);
19
    draw_set_alpha(1);
20
    blend2 = make_color_rgb(230, 100 - (sin(siner / 3) * 100), 200);
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 < 13; i += 1)
50
{
51
    offx = x + (sin((i - 49) / 3) * 85);
52
    offy = y + (cos((i - 3) / 2.2) * 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
    offv = (i * -12) - 330;
59
    if (i > 5)
60
        offv = (i * -20) - 310;
61
    if (i > 7)
62
        offv = (i * -22) - 310;
63
    if (global.soul_rescue < 3)
64
        draw_sprite_ext(sprite_index, image_index, offx, offy, 1 + offs, (1 + offs) - (sin(i / 5) * 0.3), offv, image_blend, 1);
65
    else
66
        draw_sprite_ext(sprite_index, image_index, offx, offy, 1, 1, offv, c_gray, 1);
67
}
68
for (i = 0; i < 13; i += 1)
69
{
70
    offx2 = (x - (sin((i - 49) / 3) * 85)) + op;
71
    offy2 = y + (cos((i - 3) / 2.2) * 40) + (cos((i + siner) / 6) * 8);
72
    offs2 = sin((siner + (i * 4)) / 6) * 2;
73
    if (offs2 > 1)
74
        offs2 = (offs2 - 1) / 3;
75
    else
76
        offs2 = 0;
77
    offv2 = (i * 12) + magicfactor;
78
    if (i > 5)
79
        offv2 = (i * 30) + magicfactor2;
80
    if (i > 7)
81
        offv2 = (i * 20) + magicfactor3;
82
    if (global.soul_rescue < 4)
83
        draw_sprite_ext(sprite_index, image_index, offx2, offy2, -1 - offs2, (1 + offs2) - (sin(i / 5) * 0.3), offv2, blend2, 1);
84
    else
85
        draw_sprite_ext(sprite_index, image_index, offx2, offy2, -1, 1, offv2, c_gray, 1);
86
}