Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_teevie_lightmaze_Step_0

(view raw script w/o annotations or w/e)
1
with (cheese)
2
{
3
    if (myinteract == 3)
4
    {
5
        global.interact = 1;
6
        
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("no_name");
7
        msgsetloc(0, 
* (This cheese seems slightly out of place.)Wait for input
"* (This cheese seems slightly out of place.)/", "obj_dw_teevie_lightmaze_slash_Step_0_gml_11_0"
);
8
        
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("susie", 17);
9
        msgnextloc(
* Aw hell yeah,Delay 11 free cheese.Wait for inputClose Message
"* Aw hell yeah^1, free cheese./%", "obj_dw_teevie_lightmaze_slash_Step_0_gml_13_0"
);
10
        d_make();
11
        myinteract = 4;
12
    }
13
    if (myinteract == 4 && 
scr_getmsgno_d
scr_getmsgno_d

function
scr_getmsgno_d()
{ if (instance_exists(obj_dialoguer) && instance_exists(obj_dialoguer.writer)) return obj_dialoguer.writer.msgno; }
(2) && other.cheesejump == 0)
14
    {
15
        other.cheesejump = 1;
16
        with (obj_caterpillarchara)
17
        {
18
            if (name == "susie")
19
            {
20
                for (i = 0; i < 25; i += 1)
21
                    facing[i] = 0;
22
                
scr_jump_in_place
scr_jump_in_place

function
scr_jump_in_place(arg0, arg1)
{
scr_jump_to_point(x, y, arg0, arg1);
}
(12, 8);
23
            }
24
        }
25
    }
26
    if (myinteract == 4 && !d_ex())
27
    {
28
        myinteract = -1;
29
        snd_play(snd_item);
30
        image_index = 1;
31
        scr_delay_var("myinteract", 5, 30);
32
    }
33
    if (myinteract == 5)
34
    {
35
        
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("no_name");
36
        msgsetloc(0, 
* (The cheese has been consumed)Wait for input
"* (The cheese has been consumed)/", "obj_dw_teevie_lightmaze_slash_Step_0_gml_43_0"
);
37
        msgnextloc(
* (The lights didn't like that)Wait for inputClose Message
"* (The lights didn't like that)/%", "obj_dw_teevie_lightmaze_slash_Step_0_gml_44_0"
);
38
        d_make();
39
        myinteract = 6;
40
    }
41
    if (myinteract == 6 && !d_ex())
42
    {
43
        global.interact = 0;
44
        
scr_marker_ext
scr_marker_ext

function
scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{ var thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { depth = arg8; sprite_index = arg2; image_speed = arg5; image_xscale = arg3; image_yscale = arg4; image_index = arg6; image_blend = arg7; image_alpha = arg11; if (arg9)
scr_depth();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; }
(x, y, sprite_index, 2, 2, 0, 1, undefined, depth);
45
        setxy(room_width * 2, room_height * 2);
46
        myinteract = 7;
47
    }
48
}
49
if (con == 0)
50
{
51
    with (obj_board_trigger)
52
    {
53
        if (place_meeting(x, y, obj_mainchara))
54
        {
55
            other.finishline.visible = true;
56
            instance_destroy();
57
        }
58
    }
59
    if (treasuretrig == 1)
60
    {
61
        if (obj_treasure_room.image_index == 1)
62
        {
63
            con = 1;
64
            timer = 0;
65
        }
66
    }
67
    if (cheese.myinteract == 7 && !d_ex())
68
    {
69
        timer = 29;
70
        con = 2;
71
    }
72
    var amcaught = false;
73
    with (obj_dw_teevie_stealth_chaselamp)
74
    {
75
        if (caught)
76
            amcaught = true;
77
    }
78
    if (amcaught)
79
    {
80
        snd_stop(snd_crowd_cheer_single);
81
        timer = 0;
82
        con = 4;
83
    }
84
}
85
if (con == 1 && !d_ex())
86
{
87
    con = 2;
88
    timer = 0;
89
}
90
if (con == 2)
91
{
92
    timer++;
93
    if (timer == 1)
94
    {
95
        with (obj_dw_teevie_cameras_cheer)
96
            active = true;
97
        with (obj_dw_teevie_cameras_crowd)
98
            active = true;
99
        snd_play(snd_crowd_cheer_single);
100
    }
101
    if (timer == 30)
102
    {
103
        triggeralarm = 1;
104
        con = 3;
105
        timer = 0;
106
    }
107
}
108
if (con == 3)
109
{
110
    var amcaught = false;
111
    with (obj_dw_teevie_stealth_chaselamp)
112
    {
113
        if (caught)
114
            amcaught = true;
115
    }
116
    if (amcaught)
117
    {
118
        snd_stop(snd_crowd_cheer_single);
119
        snd_play(snd_b);
120
        con++;
121
    }
122
}
123
if (con == 4)
124
{
125
    var side = 0;
126
    var xloc = obj_mainchara.x + 46;
127
    var sizex = 2;
128
    if (global.facing == 3)
129
        side = 1;
130
    if (obj_mainchara.x < (camerax() + 210))
131
        side = 0;
132
    if (obj_mainchara.x > (camerax() + 488))
133
        side = 1;
134
    if (side == 1)
135
    {
136
        xloc = obj_mainchara.x - 8;
137
        sizex = -2;
138
    }
139
    var yloc = obj_mainchara.bbox_bottom - 137;
140
    timer++;
141
    if (timer == 15)
142
    {
143
        zapper = 
scr_marker_ext
scr_marker_ext

function
scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{ var thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { depth = arg8; sprite_index = arg2; image_speed = arg5; image_xscale = arg3; image_yscale = arg4; image_index = arg6; image_blend = arg7; image_alpha = arg11; if (arg9)
scr_depth();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; }
(xloc, cameray() - 120, spr_zapper_jump_noshadow, sizex, 2, 0, 5, undefined, obj_mainchara.depth);
144
        zapper.gravity = 3;
145
        scr_limitval_upper(zapper, "y", yloc, 30);
146
    }
147
    if (timer >= 15 && zapper.y >= yloc)
148
    {
149
        zapper.gravity = 0;
150
        zapper.vspeed = 0;
151
        zapper.speed = 0;
152
        with (zapper)
153
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_index", 5, 8, 6, 3, "out");
154
        snd_play_delay(snd_noise, 2, 0.8, 0.9);
155
        con = 5;
156
        timer = 0;
157
    }
158
}
159
if (con == 5)
160
{
161
    timer++;
162
    if (timer == 3)
163
    {
164
        
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("zapper");
165
        msgsetloc(0, 
* Time for youse to skee-daddle!Wait for inputClose Message
"* Time for youse to skee-daddle!/%", "obj_dw_teevie_lightmaze_slash_Step_0_gml_173_0"
);
166
        d_make();
167
        timer = 0;
168
        con = 6;
169
    }
170
}
171
if (con == 6 && !d_ex())
172
{
173
    if (global.flag[1149] == 0)
174
    {
175
        con = 7;
176
    }
177
    else
178
    {
179
    }
180
}
181
if (con == 7)
182
{
183
    zapper.sprite_index = spr_zapper_jump;
184
    if (zapper.image_xscale == -2)
185
    {
186
        zapper.image_xscale = 2;
187
        zapper.x -= 134;
188
    }
189
    zapper.image_index = 0;
190
    zapper.depth = -999;
191
    
scr_battle
scr_battle

function
scr_battle(arg0, arg1, arg2, arg3, arg4)
{ global.specialbattle = arg1; global.encounterno = arg0; if (global.flag[9 battle_music] != 2) { global.flag[9 battle_music] = 1; var batmusic = "battle.ogg"; if (global.chapter == 3) { if (global.encounterno == 111 && room == room_board_2) batmusic = "rudebuster_boss.ogg"; if (room == room_dw_b3bs_watercooler || room == room_dw_teevie_watercooler || room == room_dw_b3bs_zapper_b || room == room_dw_ranking_c) batmusic = "battle_vapor.ogg"; if (room == room_dw_teevie_chef) batmusic = "rouxls_battle.ogg"; } global.batmusic[0] = snd_init(batmusic); mus_volume(global.batmusic[1], 1, 0); } instance_create(0, 0, obj_battleback); instance_create(0, 0, obj_encounterbasic); __enemymarker[0] = arg2; __enemymarker[1] = arg3; __enemymarker[2] = arg4; for (__ien = 0; __ien < 3; __ien++) { if (global.monstertype[__ien] != 0(None)) { if (!i_ex(__enemymarker[__ien])) { __enemymarker[__ien] =
scr_dark_marker(global.monstermakex[__ien] + 300, global.monstermakey[__ien], object_get_sprite(global.monsterinstancetype[__ien]));
__enemymarker[__ien].depth = -__ien; } __enemymarker[__ien].__ien = __ien; with (__enemymarker[__ien]) { if (global.monstertype[other.__ien] == 103Tenna) { x = camerax() + 510; y = cameray() + 288;
scr_move_to_point_over_time(camerax() + 526, cameray() + 260, 20);
sprite_index = spr_tenna_point_up; } else if (global.monstertype[other.__ien] == 104Knight) { with (obj_ch3_PTB02_roaringknight) stopsiner2 = true;
scr_move_to_point_over_time(global.monstermakex[__ien], obj_ch3_PTB02_roaringknight.ystart + (cos(obj_ch3_PTB02_roaringknight.siner2 / 8) * 8), 20);
} else {
scr_move_to_point_over_time(global.monstermakex[__ien], global.monstermakey[__ien], 20);
} __doom = instance_create(x, y, obj_doom); __doom.target = id; __doom.alarm[0] = 25; } } } }
(112, 0, zapper);
192
    con = 8;
193
}
194
if (con == 8 && i_ex(obj_battleback))
195
{
196
    timer = 0;
197
    con = 9;
198
}
199
if (con == 9)
200
{
201
    timer++;
202
    if (timer == 15)
203
    {
204
        global.flag[1164 lightmaze_fought] = 1;
205
        with (obj_dw_teevie_stealth_chaselamp)
206
            instance_destroy();
207
        with (obj_dw_teevie_cameras_cheer)
208
            instance_destroy();
209
        with (obj_dw_teevie_cameras_crowd)
210
            instance_destroy();
211
        finishline.visible = false;
212
        safe_delete(cheese);
213
        con = 10;
214
    }
215
}
216
if (endcon == 0)
217
{
218
    var trig = false;
219
    with (obj_triggervolume)
220
    {
221
        if (place_meeting(x, y, obj_mainchara))
222
            trig = true;
223
    }
224
    if (trig == true)
225
    {
226
        endcon = 1;
227
        endcontimer = 0;
228
    }
229
}
230
if (endcon == 1)
231
{
232
    endcontimer++;
233
    if (endcontimer == 1)
234
    {
235
        with (obj_dw_teevie_cameras_cheer)
236
            active = true;
237
        with (obj_dw_teevie_cameras_crowd)
238
            active = true;
239
        if (i_ex(obj_dw_teevie_cameras_crowd))
240
            snd_play(snd_crowd_cheer_single);
241
    }
242
    if (endcontimer == 4)
243
        triggeralarm = 1;
244
}
245
if (triggeralarm == 1)
246
{
247
    triggeralarm = 2;
248
    with (obj_dw_teevie_stealth_chaselamp)
249
        scr_delay_var("manualtrigger", true, 1 + irandom(7));
250
}