Undertale script viewer

← back to main script listing

gml_Object_obj_floweyx_tv_Draw_0

(view raw script w/o annotations or w/e)
1
if (tvmode == 0)
2
{
3
    draw_sprite_ext(spr_tvinside_old, anim, x + 20 + random(4), y + 50 + random(4), size + 0.9 + random(0.1), size + random(0.1) + 0.4, 0, c_white, 1);
4
    anim += animspeed;
5
    if (anim > (animchoice + 1))
6
        animspeed = -animspeed;
7
    if (anim < (animchoice - 1))
8
        animspeed = -animspeed;
9
    animtimer += 1;
10
    if (animtimer > 100)
11
    {
12
        draw_sprite_ext(spr_noise, random(3), x + 20 + random(4), y + 50 + random(4), size + 0.8 + random(0.1), size + random(0.1) + 0.4, 0, c_white, 1);
13
        animchoice = round(random(100));
14
        anim = animchoice;
15
        if (animtimer > 106)
16
            animtimer = 0;
17
    }
18
    draw_sprite(sprite_index, image_index, x, y + (sin(siner / 3) * 1));
19
    siner += 1;
20
}
21
if (tvmode == 1)
22
{
23
    alarm[1] = -1;
gml_Object_obj_floweyx_tv_Alarm_1.gml

with (obj_flowey_master) caster_play(sfx_oh, 1, 0.95 + random(0.2));
24
    draw_set_color(c_black);
25
    ossafe_fill_rectangle(x + 20, y + 10, x + 160, y + 140);
26
    draw_sprite_ext(spr_tv_warning, 0, x + 20, y + 50, 1, 1, 0, c_white, 0.8 + sin(siner / 2));
27
    draw_sprite(spr_allsoul, global.soul_rescue, x + 80 + random(3), y + 110 + random(3));
28
    draw_sprite(sprite_index, image_index, x, y + (sin(siner / 3) * 1));
29
    siner += 1;
30
}
31
if (tvmode == 2)
32
{
33
    alarm[1] = -1;
gml_Object_obj_floweyx_tv_Alarm_1.gml

with (obj_flowey_master) caster_play(sfx_oh, 1, 0.95 + random(0.2));
34
    draw_sprite_ext(spr_noise, random(3), x + 26, y + 50, 1.2, 1, 0, c_white, 1);
35
    draw_sprite(sprite_index, image_index, x, y + (sin(siner / 3) * 1));
36
}
37
if (tvmode == 3)
38
{
39
    draw_set_color(c_black);
40
    ossafe_fill_rectangle(x + 20, y + 10, x + 160, y + 140);
41
    siner += 1;
42
    draw_sprite(spr_allsoul, global.soul_rescue, x + 80, y + 90 + (sin(siner / 8) * 3));
43
    draw_sprite(sprite_index, image_index, x, y + (sin(siner / 3) * 1));
44
}
45
if (tvmode == 4)
46
{
47
    draw_sprite_ext(spr_tvinside_old, tt, x + 20 + random(4), y + 50 + random(4), size + 0.9 + random(0.1), size + random(0.1) + 0.4, 0, c_white, 1);
48
    draw_sprite(sprite_index, image_index, x, y + (sin(siner / 3) * 1));
49
}
50
if (tvmode == 5)
51
{
52
    draw_set_color(c_black);
53
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
54
    draw_sprite(sprite_index, image_index, x, y);
55
}
56
if (tvmode == 10)
57
{
58
    draw_sprite_ext(spr_tv_exface, tt, x + 13, y + 50, 1, 1, 0, c_white, 1);
59
    draw_sprite(sprite_index, image_index, x, y);
60
}
61
if (tvmode == 11)
62
{
63
    draw_set_color(c_black);
64
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
65
    draw_sprite_ext(spr_tv_floweyface, floor(global.faceemotion), x + 21 + random(2), y + 56 + random(2), 2.9 + random(0.1), 2.9 + random(0.1), 0, c_white, 1);
66
    draw_sprite(sprite_index, image_index, x, y);
67
}
68
if (tvmode == 12)
69
{
70
    draw_sprite_ext(spr_tvinside_old, 35, x + 20 + random(4), y + 50 + random(4), size + 0.9 + random(0.1), size + random(0.1) + 0.4, 0, c_white, 1);
71
    anim4 = 0;
72
    draw_sprite(sprite_index, image_index, x, y + (sin(siner / 3) * 1));
73
}
74
if (tvmode == 13)
75
{
76
    draw_set_color(c_black);
77
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
78
    draw_sprite_ext(spr_tvinside_old, 35, x + 20 + random(4), y + 50 + random(4), size + 0.9 + random(0.1), size + random(0.1) + 0.4, 0, c_white, 1 - anim4);
79
    anim4 += 0.01;
80
    draw_sprite(sprite_index, image_index, x, y + (sin(siner / 3) * 1));
81
    siner += 1;
82
}
83
if (tvmode == 18)
84
{
85
    draw_set_color(c_white);
86
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
87
    siner += 1;
88
    draw_sprite(sprite_index, image_index, x, y);
89
    draw_sprite_ext(spr_tv_floweyx_laugh, 0, x + 25, y + 65, 1.3, 1, 0, c_white, 1);
90
}
91
if (tvmode == 19)
92
{
93
    draw_set_color(c_white);
94
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
95
    siner += 1;
96
    draw_sprite_ext(spr_tv_floweyx_laugh, floor(anim4), x + 25, y + 65, 1.3, 1, 0, c_white, 1);
97
    draw_sprite_ext(sprite_index, image_index, x, y, 1, 1, 0, image_blend, 1);
98
    anim5 += 0.5;
99
    if (anim4 < 6)
100
        anim4 += 0.5;
101
    if (anim5 > 22)
102
    {
103
        if (anim4 < 15)
104
            anim4 += 0.5;
105
    }
106
}
107
if (tvmode == 20)
108
{
109
    draw_set_color(c_white);
110
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
111
    siner += 1;
112
    draw_sprite(sprite_index, image_index, x, y + (sin((siner * pi) / 2) * 2));
113
    draw_sprite_ext(spr_tv_floweyx_laugh_o, floor(anim3), x + 25, y + 65, 1.3, 1, 0, c_white, 1);
114
    anim3 += 0.5;
115
}
116
if (tvmode == 21)
117
{
118
    draw_set_color(c_white);
119
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
120
    siner += 1;
121
    draw_sprite(sprite_index, image_index, x, y + (sin(siner / 3) * 2));
122
    draw_sprite_ext(spr_tv_floweyx_smile, 0, x + 25, y + 65 + sin(siner / 3), 1.3, 1, 0, c_white, 1);
123
}
124
if (tvmode == 22)
125
{
126
    draw_set_color(c_white);
127
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
128
    siner += 1;
129
    draw_sprite(sprite_index, image_index, x, y);
130
    draw_sprite_ext(spr_tv_floweyx_laugh_piss, global.faceemotion, x + 25 + random(2), y + 65 + random(2), 1.3, 1, 0, c_white, 1);
131
}
132
if (tvmode == 24)
133
{
134
    draw_set_color(c_black);
135
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
136
    draw_set_color(c_white);
137
    draw_set_alpha((anim6 - 30) / 30);
138
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
139
    draw_set_alpha(1);
140
    anim6 += 1;
141
    draw_sprite_ext(spr_tv_floweyx_laugh, 0, x + 25, y + 65, 1.3, 1, 0, c_white, (anim6 - 30) / 30);
142
    draw_sprite_ext(sprite_index, image_index, x, y, 1, 1, 0, image_blend, 1);
143
}
144
if (tvmode == 25)
145
{
146
    draw_set_color(c_black);
147
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
148
    draw_sprite_ext(sprite_index, image_index, x, y, 1, 1, 0, image_blend, 1);
149
}
150
if (tvmode == 26)
151
{
152
    draw_set_color(c_black);
153
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
154
    draw_set_color(c_white);
155
    draw_set_alpha((anim6 - 11) / 10);
156
    ossafe_fill_rectangle(x + 20, y + 50, x + 160, y + 140);
157
    draw_set_alpha(1);
158
    anim6 += 1;
159
    draw_sprite_ext(spr_tv_floweyx_laugh, 11, x + 25, y + 65, 1.3, 1, 0, c_white, (anim6 - 11) / 10);
160
    draw_sprite_ext(sprite_index, image_index, x, y, 1, 1, 0, image_blend, 1);
161
}
162
if (tvmode == 99)
163
{
164
    draw_sprite_ext(spr_tvinside_old, anim, x + 20 + random(4), y + 50 + random(4), size + 0.9 + random(0.1), size + random(0.1) + 0.4, 0, c_white, 1);
165
    draw_sprite(sprite_index, image_index, (x + random(3)) - random(3), (y + random(3)) - random(3));
166
    anim += 0.5;
167
}
168
if (tvmode == 100)
169
{
170
    draw_sprite_ext(spr_tvinside_old, anim, x + 20 + random(4), y + 50 + random(4), size + 0.9 + random(0.1), size + random(0.1) + 0.4, 0, c_white, 1);
171
    draw_sprite(sprite_index, image_index, (x + random(5)) - random(5), (y + random(5)) - random(5));
172
    anim += 1;
173
}
174
if (overnoiser > 0)
175
{
176
    draw_sprite_ext(spr_noise, random(3), x + 26, y + 50, 1.2, 1, 0, c_white, 1);
177
    draw_sprite(sprite_index, image_index, x, y);
178
    overnoiser -= 1;
179
}
180
if (shudder > 0)
181
{
182
    shuddercounter += 1;
183
    if (shuddercounter > 0)
184
    {
185
        if (flasheron == 1)
186
        {
187
            draw_sprite(spr_floweyx_tv_bright, image_index, x, y + (sin(siner / 3) * 1));
188
            flasheron = 0;
189
        }
190
        else
191
        {
192
            flasheron = 1;
193
        }
194
        x = (remx + random(shudder)) - random(shudder);
195
        y = (ystart + random(shudder)) - random(shudder);
196
        shudder -= 2;
197
        shuddercounter = 0;
198
    }
199
    if (shudder < 1)
200
        shudder = 0;
201
}