Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_crayon_minigame_Create_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
draw_alpha = 0;
4
crayon_selected = 3;
5
window_set_cursor(cr_none);
6
view_x = camera_get_view_x(view_camera[0]);
7
view_y = camera_get_view_y(view_camera[0]);
8
button_x[0] = 234;
9
button_y[0] = 180;
10
button_x[1] = 234;
11
button_y[1] = 210;
12
button_highlight[0] = false;
13
button_highlight[1] = false;
14
button_width = 64;
15
button_height = 20;
16
button_text[0] = "DONE";
17
button_text[1] = "RESET";
18
event_fade_in = true;
19
event_fade_out = false;
20
pencil_xx = [36, 45, 54, 63, 72, 81, 90, 99];
21
pencil_yy = [19, 21, 23, 25, 27, 29, 31, 33];
22
pencil_color_selected = [1, 2, 3, 4, 5, 6, 7, 8];
23
id_xx = 56;
24
id_yy = 16;
25
brush_size_normal = 1;
26
brush_size_large = 3.5;
27
brush_size_current = brush_size_normal;
28
cursor_x = mouse_x;
29
cursor_y = mouse_y;
30
cursor_x_last = mouse_x;
31
cursor_y_last = mouse_y;
32
cursor_click = false;
33
cursor_click_noloop = false;
34
pencil_color = [make_color_rgb(213, 222, 231), make_color_rgb(137, 163, 187), make_color_rgb(62, 55, 207), make_color_rgb(40, 195, 72), make_color_rgb(237, 221, 53), make_color_rgb(207, 34, 67), make_color_rgb(141, 37, 17), make_color_rgb(68, 6, 6)];
35
drawing_grid = ds_grid_create(208, 147);
36
depth = -100000;
37
instance_create_depth(82 + view_x, 140 + view_y, depth - 100, obj_crayon_box);
38
instance_create_depth(0 + sprite_get_xoffset(spr_size_crayon_1) + view_x, 160 + sprite_get_yoffset(spr_size_crayon_1) + view_y, depth - 100, obj_crayon_indicator);
39
for (var i = 7; i >= 0; i--)
40
{
41
    var pencil = instance_create_depth(obj_crayon_box.x + pencil_xx[i], obj_crayon_box.y + pencil_yy[i], depth - 200, obj_crayon);
42
    pencil.crayon_color = pencil_color_selected[i];
43
}
44
scr_audio_fade_out
scr_audio_fade_out

function scr_audio_fade_out(arg0, arg1) { var snd = arg0; var fade_len = arg1; if (!audio_is_playing(snd)) return false; audio_sound_gain(snd, 0, fade_len); if (instance_exists(obj_audio_fade_helper)) { with (obj_audio_fade_helper) { if (audio_to_fade == snd) return false; } } with (instance_create(0, 0, obj_audio_fade_helper)) audio_to_fade = snd; }
(obj_radio.current_song, 500);
45
mus = audio_play_sound(mus_build_a_bot, 1, 1);
46
audio_pause_sound(mus);