Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_menu_murder_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (waiter == 1)
4
    exit;
5
switch (scene)
6
{
7
    case 0:
8
        choice_alpha += 0.01;
9
        if (choice_alpha >= 0.8)
10
        {
11
            audio_play_sound(snd_mainmenu_select, 1, 0);
12
            choice_alpha = 1;
13
            cutscene_advance();
14
        }
15
        break;
16
    case 1:
17
        if (choice == 0)
18
        {
19
            if (global.left_keyp && p[2] == true)
20
            {
21
                p[2] = false;
22
                p[1] = true;
23
                audio_play_sound(snd_mainmenu_select, 1, 0);
24
            }
25
            if (global.right_keyp && p[1] == true)
26
            {
27
                p[2] = true;
28
                p[1] = false;
29
                audio_play_sound(snd_mainmenu_select, 1, 0);
30
            }
31
            if (keyboard_multicheck_pressed(0) == true)
32
            {
33
                audio_play_sound(snd_confirm, 1, 0);
34
                if (p[1] == true)
35
                    choice = 1;
36
                if (p[2] == true)
37
                    choice = 2;
38
            }
39
        }
40
        else
41
        {
42
            choice_alpha -= 0.15;
43
            if (choice_alpha <= 0)
44
                cutscene_advance();
45
        }
46
        break;
47
    case 2:
48
        cutscene_wait(1);
49
        break;
50
    case 3:
51
        if (choice == 1)
52
        {
53
            audio_play_sound(mus_cymbal, 10, 0);
54
            alarm[1] = 1;
gml_Object_obj_menu_murder_Alarm_1.gml

alarm[1] = 1; __view_set(e__VW.XView, 0, __view_get(e__VW.XView, 0) + random_range(-sh, sh)); __view_set(e__VW.YView, 0, __view_get(e__VW.YView, 0) + random_range(-sh, sh)); sh += 0.01; enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
55
            instance_create(0, 0, obj_transition_white);
56
            if (file_exists("Save.sav"))
57
                file_delete("Save.sav");
58
            ini_open("Save02.sav");
59
            ini_write_real("00", "02", 0);
60
            ini_write_real("00", "03", 0);
61
            ini_write_real("00", "04", 0);
62
            ini_close();
63
            instance_destroy();
64
            scene++;
65
        }
66
        else
67
        {
68
            game_end();
69
        }
70
        break;
71
}