Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_dalv_determine_destination

(view raw script w/o annotations or w/e)
1
function scr_dalv_determine_destination
scr_dalv_determine_destination

function scr_dalv_determine_destination() { switch (global.flag[28 Spoken to Dalv in his house]) { case 0: switch (room) { case rm_dalvshouse: destination_x_dalv = default_x_dalvshouse; destination_y_dalv = default_y_dalvshouse; no_loop_destination_dalv = false; image_alpha = 0; direction = 180; break; default: instance_destroy(); } break; case 1: switch (room) { case rm_dalvshouse: switch (global.lastroom) { case "rm_dalvroomhall": destination_x_dalv = default_x_dalvshouse; destination_y_dalv = default_y_dalvshouse; no_loop_destination_dalv = false; image_alpha = 0; direction = 180; break; case "rm_dalvhallway": image_alpha = 1; direction = 270; x = default_x_dalvshouse; y = default_y_dalvshouse; destination_x_dalv = default_x_dalvshouse; destination_y_dalv = default_y_dalvshouse; no_loop_destination_dalv = false; break; default: image_alpha = 1; direction = 270; x = 160; y = 140; destination_x_dalv = default_x_dalvshouse; destination_y_dalv = default_y_dalvshouse; no_loop_destination_dalv = false; break; } break; case rm_dalvroomhall: switch (global.lastroom) { case "rm_dalvshouse": destination_x_dalv = default_x_dalvroomhall; destination_y_dalv = default_y_dalvroomhall; no_loop_destination_dalv = false; image_alpha = 0; direction = 0; break; case "rm_dalvsroom": break; } break; case rm_dalvhallway: switch (global.lastroom) { case "rm_dalvshouse": break; case "rm_dalvExit": break; default: instance_destroy(); } break; case rm_dalvExit: switch (global.lastroom) { case "rm_dalvhallway": break; default: instance_destroy(); } break; default: instance_destroy(); } break; default: instance_destroy(); } }
()
2
{
3
    switch (global.flag[28 Spoken to Dalv in his house])
4
    {
5
        case 0:
6
            switch (room)
7
            {
8
                case rm_dalvshouse:
9
                    destination_x_dalv = default_x_dalvshouse;
10
                    destination_y_dalv = default_y_dalvshouse;
11
                    no_loop_destination_dalv = false;
12
                    image_alpha = 0;
13
                    direction = 180;
14
                    break;
15
                default:
16
                    instance_destroy();
17
            }
18
            break;
19
        case 1:
20
            switch (room)
21
            {
22
                case rm_dalvshouse:
23
                    switch (global.lastroom)
24
                    {
25
                        case "rm_dalvroomhall":
26
                            destination_x_dalv = default_x_dalvshouse;
27
                            destination_y_dalv = default_y_dalvshouse;
28
                            no_loop_destination_dalv = false;
29
                            image_alpha = 0;
30
                            direction = 180;
31
                            break;
32
                        case "rm_dalvhallway":
33
                            image_alpha = 1;
34
                            direction = 270;
35
                            x = default_x_dalvshouse;
36
                            y = default_y_dalvshouse;
37
                            destination_x_dalv = default_x_dalvshouse;
38
                            destination_y_dalv = default_y_dalvshouse;
39
                            no_loop_destination_dalv = false;
40
                            break;
41
                        default:
42
                            image_alpha = 1;
43
                            direction = 270;
44
                            x = 160;
45
                            y = 140;
46
                            destination_x_dalv = default_x_dalvshouse;
47
                            destination_y_dalv = default_y_dalvshouse;
48
                            no_loop_destination_dalv = false;
49
                            break;
50
                    }
51
                    break;
52
                case rm_dalvroomhall:
53
                    switch (global.lastroom)
54
                    {
55
                        case "rm_dalvshouse":
56
                            destination_x_dalv = default_x_dalvroomhall;
57
                            destination_y_dalv = default_y_dalvroomhall;
58
                            no_loop_destination_dalv = false;
59
                            image_alpha = 0;
60
                            direction = 0;
61
                            break;
62
                        case "rm_dalvsroom":
63
                            break;
64
                    }
65
                    break;
66
                case rm_dalvhallway:
67
                    switch (global.lastroom)
68
                    {
69
                        case "rm_dalvshouse":
70
                            break;
71
                        case "rm_dalvExit":
72
                            break;
73
                        default:
74
                            instance_destroy();
75
                    }
76
                    break;
77
                case rm_dalvExit:
78
                    switch (global.lastroom)
79
                    {
80
                        case "rm_dalvhallway":
81
                            break;
82
                        default:
83
                            instance_destroy();
84
                    }
85
                    break;
86
                default:
87
                    instance_destroy();
88
            }
89
            break;
90
        default:
91
            instance_destroy();
92
    }
93
}