Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_mc_puzzle_controller_2_Step_0

(view raw script w/o annotations or w/e)
1
if (puzzle_count >= 3 && !puzzle_finished)
2
{
3
    puzzle_finished = true;
4
    scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() { global.cutscene = true; obj_pl.state = scr_frozen_state; obj_pl.image_index = 0; obj_pl.image_speed = 0; }
();
5
    timer[0] = 30;
6
    global.dialogue_open = false;
7
}
8
for (var i = 0; i < array_length_1d(timer); i++)
9
{
10
    if (timer[i] > 0)
11
        timer[i]--;
12
}
13
if (timer[0] == 0)
14
{
15
    instance_create(0, 0, obj_screenshake);
16
    obj_mc_path_blocker.image_index = 1;
17
    audio_play_sound(snd_attackhitcrit, 1, 0);
18
    timer[1] = 30;
19
    timer[0] = -1;
20
}
21
if (timer[1] == 0)
22
{
23
    global.cutscene = false;
24
    global.dunes_flag[8] = true;
25
    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
26
    with (msg)
27
        message[0] = "* (The path has been opened.)";
28
    instance_destroy();
29
    timer[1] = -1;
30
}