Undertale script viewer

← back to main script listing

gml_Object_obj_floweyx_lefteye_Draw_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    if (frozen == 0)
4
    {
5
        siner += 1;
6
        if (desperate == 1)
7
            siner += 0.1;
8
    }
9
    else if (frozen != 4)
10
    {
11
        x = (xstart + random(6)) - random(6);
12
    }
13
}
14
if (global.debug == 1)
15
{
16
    if (keyboard_check_pressed(ord("E")))
17
        con = 1;
18
}
19
if (con == 1)
20
{
21
    con = 3;
22
    alarm[4] = 2;
23
}
24
if (con == 3)
25
{
26
    siner2 += 1.2;
27
    md = 1;
28
    gr = make_color_rgb(170 + (sin(siner2 / 2) * 70), 170 + (sin((siner2 + 3) / 2) * 70), 170 + (sin((siner2 + 6) / 2) * 70));
29
    grgr = make_color_rgb(170 + (sin((siner2 + 1) / 2) * 70), 170 + (sin((siner2 + 4) / 2) * 70), 170 + (sin((siner2 + 7) / 2) * 70));
30
    grgrgr = make_color_rgb(170 + (sin((siner2 + 2) / 2) * 70), 170 + (sin((siner2 + 4) / 2) * 70), 170 + (sin((siner2 + 8) / 2) * 70));
31
}
32
if (con == 4)
33
{
34
    con = 5;
35
    durara = 0;
36
    oner = choose(0, 1);
37
    alarm[4] = 3;
38
    if (wimpy == 1)
39
        alarm[4] = 3;
40
    image_blend = c_white;
41
}
42
if (con == 5)
43
{
44
    opx = 0;
45
    eba = instance_create(x, y, obj_eyeshot_a);
46
    eba.memorymode = memorymode;
47
    eba.durara = durara;
48
    eba.oner = oner;
49
    if (wimpy == 0)
50
    {
51
        with (eba)
52
        {
53
            move_towards_point(obj_vsflowey_heart.x + 8, obj_vsflowey_heart.y + 8, 12);
54
            friction = -0.2;
55
            direction += (18 - (durara * 18));
56
        }
57
    }
58
    if (wimpy == 1)
59
    {
60
        with (eba)
61
        {
62
            move_towards_point(obj_vsflowey_heart.x + 8, obj_vsflowey_heart.y + 8, 5);
63
            friction = -0.1;
64
            direction += (30 - (durara * 30));
65
        }
66
    }
67
    opx = op;
68
    ebb = instance_create(x + opx, y, obj_eyeshot_a);
69
    ebb.memorymode = memorymode;
70
    ebb.durara = durara;
71
    ebb.oner = oner;
72
    if (wimpy == 0)
73
    {
74
        with (ebb)
75
        {
76
            move_towards_point(obj_vsflowey_heart.x + 8, obj_vsflowey_heart.y + 8, 12);
77
            friction = -0.2;
78
            direction += (18 - (durara * 18));
79
        }
80
    }
81
    if (wimpy == 1)
82
    {
83
        with (ebb)
84
        {
85
            move_towards_point(obj_vsflowey_heart.x + 8, obj_vsflowey_heart.y + 8, 5);
86
            friction = -0.1;
87
            direction += (30 - (durara * 30));
88
        }
89
    }
90
    durara += 1;
91
    md = 1;
92
    if (gr == 16777215)
93
    {
94
        gr = 255;
95
        grgr = 0;
96
        grgrgr = 0;
97
    }
98
    else
99
    {
100
        gr = 16777215;
101
        grgr = 16777215;
102
        grgrgr = 16777215;
103
    }
104
}
105
if (con == 6)
106
{
107
    gr = 16777215;
108
    grgr = 16777215;
109
    grgrgr = 16777215;
110
    md = 0;
111
    image_blend = c_white;
112
    con = 0;
113
}
114
if (con == 10)
115
{
116
    siner2 += 1.2;
117
    md = 1;
118
    gr = make_color_rgb(170 + (sin(siner2 / 2) * 70), 170 + (sin((siner2 + 3) / 2) * 70), 170 + (sin((siner2 + 6) / 2) * 70));
119
    grgr = make_color_rgb(170 + (sin((siner2 + 1) / 2) * 70), 170 + (sin((siner2 + 4) / 2) * 70), 170 + (sin((siner2 + 7) / 2) * 70));
120
    grgrgr = make_color_rgb(170 + (sin((siner2 + 2) / 2) * 70), 170 + (sin((siner2 + 4) / 2) * 70), 170 + (sin((siner2 + 8) / 2) * 70));
121
}
122
rot = sin(siner / 3) * 4;
123
rotx = sin(siner / 4) * 3;
124
roty = cos(siner / 4) * 3;
125
if (md == 0)
126
{
127
    draw_sprite_ext(spr_lefteye_nopupil, image_index, (x + (rotx * 2)) - 2, y + roty, 1, 1, rot, image_blend, 1);
128
    if (desperate == 0)
129
        draw_sprite_ext(spr_lefteye_pupil, image_index, (x + (rotx * 2.5)) - 2, y + roty, 1 - (sin(siner / 2) * 0.2), 1 - (sin(siner / 2) * 0.2), rot, image_blend, 1);
130
    if (desperate == 1)
131
    {
132
        if (frozen == 0 || frozen == 4)
133
            draw_sprite_ext(spr_lefteye_pupil, image_index, (x + (rotx * 2.5)) - 2, y + roty, 1 - (sin(siner / 2) * 0.2), 1 - (sin(siner / 2) * 0.2), rot, image_blend, 1);
134
        else
135
            draw_sprite_ext(spr_lefteye_pupil, image_index, (x + (rotx * 2.5)) - random(3), y + roty + random(2), 0.5 - (sin(siner / 2) * 0.1), 0.5 - (sin(siner / 2) * 0.1), rot, image_blend, 1);
136
    }
137
    if (desperate == 2)
138
        draw_sprite_ext(spr_lefteye_pupil, image_index, (x + (rotx * 3)) - 2, y + roty, 0.6 - (sin(siner / 2) * 0.3), 0.6 - (sin(siner / 2) * 0.3), rot, image_blend, 1);
139
}
140
if (md == 1)
141
{
142
    draw_sprite_ext(spr_lefteye_nopupil_flash, image_index, (x + (rotx * 2)) - 2, y + roty, 1, 1, rot, grgr, 1);
143
    draw_sprite_ext(spr_lefteye_pupil_flash, image_index, (x + (rotx * 2.5)) - 2, y + roty, 1 - (sin(siner / 2) * 0.2), 1 - (sin(siner / 2) * 0.2), rot, gr, 1);
144
}
145
draw_sprite_ext(spr_lefteye_overlay, image_index, x + rotx, y + roty, 1, 1, rot, image_blend, 1);
146
op = 250;
147
if (md == 0)
148
{
149
    draw_sprite_ext(spr_lefteye_nopupil, image_index, ((x + op) - (rotx * 2)) + 2, y + roty, -1, 1, -rot, image_blend, 1);
150
    if (desperate == 0)
151
        draw_sprite_ext(spr_lefteye_pupil, image_index, ((x + op) - (rotx * 2.5)) + 2, y + roty, -1 + (cos(siner / 2) * 0.2), 1 - (cos(siner / 2) * 0.2), -rot, image_blend, 1);
152
    if (desperate == 1)
153
    {
154
        if (frozen == 0 || frozen == 4)
155
            draw_sprite_ext(spr_lefteye_pupil, image_index, ((x + op) - (rotx * 2.5)) + 2, y + roty, -1 + (cos(siner / 2) * 0.2), 1 - (cos(siner / 2) * 0.2), -rot, image_blend, 1);
156
        else
157
            draw_sprite_ext(spr_lefteye_pupil, image_index, ((x + op) - (rotx * 2.5)) + 2, y + roty, -0.5 + (cos(siner / 2) * 0.1), 0.5 - (cos(siner / 2) * 0.1), -rot, image_blend, 1);
158
    }
159
    if (desperate == 2)
160
        draw_sprite_ext(spr_lefteye_pupil, image_index, ((x + op) - (rotx * 3)) + 2, y + roty, -0.6 + (cos(siner / 2) * 0.3), 0.6 - (cos(siner / 2) * 0.3), -rot, image_blend, 1);
161
}
162
if (md == 1)
163
{
164
    draw_sprite_ext(spr_lefteye_nopupil_flash, image_index, ((x + op) - (rotx * 2)) + 2, y + roty, -1, 1, -rot, grgr, 1);
165
    draw_sprite_ext(spr_lefteye_pupil_flash, image_index, ((x + op) - (rotx * 2.5)) + 2, y + roty, -1 + (cos(siner / 2) * 0.2), 1 - (cos(siner / 2) * 0.2), -rot, gr, 1);
166
}
167
draw_sprite_ext(spr_lefteye_overlay, image_index, (x + op) - rotx, y + roty, -1, 1, -rot, image_blend, 1);