Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_factory_03_shaft_Step_0

(view raw script w/o annotations or w/e)
1
switch (scene)
2
{
3
    case 0:
4
        cutscene_follower_into_actor();
5
        if (global.sworks_flag[37] < 2)
6
            instance_create(0, 0, obj_factory_03_shaft_intro);
7
        else
8
            instance_create(x, y, obj_overworld_fade_in_screen);
9
        instance_create(obj_pl.x, obj_pl.y, obj_player_npc);
10
        with (obj_player_npc)
11
        {
12
            x = 185;
13
            y = 147;
14
            action_sprite = true;
15
            sprite_index = spr_factory_03_clover_lying_down;
16
        }
17
        with (actor_follower)
18
        {
19
            x = 144;
20
            y = 144;
21
            action_sprite = true;
22
            sprite_index = spr_factory_03_ceroba_lying_down;
23
        }
24
        break;
25
    case 1:
26
        if (!instance_exists(obj_factory_03_shaft_intro))
27
            scene++;
28
        break;
29
    case 2:
30
        if (global.sworks_flag[37] == 1)
31
            cutscene_wait(2);
32
        else
33
            cutscene_wait(0.5);
34
        break;
35
    case 3:
36
        cutscene_dialogue();
37
        if (global.sworks_flag[37] == 1)
38
        {
39
            with (msg)
40
            {
41
                position = 1;
42
                ch_msg = 2;
43
                talker[0] = 1161;
44
                message[0] = "* Ow...";
45
                message[1] = "* I am so tired of this#  \"falling\" thing. ";
46
                message[2] = "* How about you?";
47
                prt[0] = 384;
48
                prt[1] = 377;
49
                prt[2] = 370;
50
                ch[1] = "So\ntired...";
51
                ch[2] = "Again!";
52
                if (outcome == 1)
53
                {
54
                    message[3] = "* Like, can't gravity#  screw off every now and#  then? Seriously.";
55
                    prt[3] = 377;
56
                }
57
                if (outcome == 2)
58
                {
59
                    message[3] = "* Again??? You didn't#  hit your head just#  now, did you?";
60
                    prt[3] = 381;
61
                }
62
                message[4] = "* Sigh...";
63
                prt[4] = 370;
64
            }
65
        }
66
        else
67
        {
68
            with (msg)
69
            {
70
                position = 1;
71
                talker[0] = 1161;
72
                message[0] = "* Ugh...";
73
                prt[0] = 370;
74
            }
75
        }
76
        break;
77
    case 4:
78
        cutscene_npc_reset_sprite(1161, "down");
79
        audio_play_sound(snd_playerjump, 1, 0);
80
        with (obj_ceroba_npc)
81
            path_start(pt_pljump, 2, path_action_stop, false);
82
        break;
83
    case 5:
84
        with (obj_ceroba_npc)
85
        {
86
            if (path_position >= 1)
87
                other.scene++;
88
        }
89
        break;
90
    case 6:
91
        obj_ceroba_npc.npc_direction = "right";
92
        cutscene_dialogue();
93
        if (global.sworks_flag[37] == 1)
94
        {
95
            with (msg)
96
            {
97
                position = 1;
98
                talker[0] = 1161;
99
                message[0] = "* Come on, get up. We can#  do this.";
100
                prt[0] = 370;
101
            }
102
        }
103
        else
104
        {
105
            with (msg)
106
            {
107
                position = 1;
108
                talker[0] = 1161;
109
                message[0] = "* Gotta try again.";
110
                prt[0] = 370;
111
            }
112
        }
113
        break;
114
    case 7:
115
        cutscene_npc_reset_sprite(1168, "down");
116
        audio_play_sound(snd_playerjump, 1, 0);
117
        with (obj_player_npc)
118
            path_start(pt_pljump, 2, path_action_stop, false);
119
        break;
120
    case 8:
121
        with (obj_player_npc)
122
        {
123
            if (path_position >= 1)
124
                other.scene++;
125
        }
126
        break;
127
    case 9:
128
        cutscene_wait(0.5);
129
        break;
130
    case 10:
131
        obj_pl.direction = 0;
132
        cutscene_actor_into_follower();
133
        obj_pl.direction = 270;
134
        global.sworks_flag[37] = 2;
135
        global.sworks_flag[23] = 1;
136
        cutscene_end();
137
        break;
138
}