Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_teevie_audiencepits_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    crowdcheer = snd_loop(snd_crowd_laughter_loop);
4
    snd_volume(crowdcheer, 0, 0);
5
    init = 1;
6
}
7
var triggered = 0;
8
with (obj_dw_teevie_cameras_cheer)
9
{
10
    if (active)
11
        triggered = 1;
12
}
13
if (con == 0)
14
{
15
    var trig = 0;
16
    with (obj_dw_teevie_cameras)
17
    {
18
        if (triggered)
19
            trig = 1;
20
    }
21
    if (trig)
22
    {
23
        gray = lerp(gray, 1, 0.125);
24
        fade = lerp(fade, 0.75, 0.125);
25
    }
26
    else
27
    {
28
        gray = lerp(gray, 0, 0.125);
29
        fade = lerp(fade, 0, 0.125);
30
    }
31
    var _caught = false;
32
    with (obj_dw_teevie_stealth_chaselamp)
33
    {
34
        if (caught == true)
35
            _caught = true;
36
    }
37
    if (_caught)
38
    {
39
        
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; }
("fade", fade, 0, 4);
40
        
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; }
("gray", gray, 0, 4);
41
        timer = 0;
42
        con = 1;
43
        with (obj_dw_teevie_cameras)
44
            disable = true;
45
    }
46
}
47
if (con == 1)
48
{
49
    var xloc = obj_mainchara.x + 46;
50
    var sizex = 2;
51
    if (global.facing == 3)
52
    {
53
        xloc = obj_mainchara.x - 8;
54
        sizex = -2;
55
    }
56
    var yloc = obj_mainchara.bbox_bottom - 137;
57
    timer++;
58
    if (timer == 15)
59
    {
60
        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);
61
        zapper.gravity = 3;
62
        scr_limitval_upper(zapper, "y", yloc, 30);
63
    }
64
    if (timer >= 15 && zapper.y >= yloc)
65
    {
66
        zapper.gravity = 0;
67
        zapper.vspeed = 0;
68
        zapper.speed = 0;
69
        with (zapper)
70
            
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");
71
        snd_play_delay(snd_noise, 2, 0.8, 0.9);
72
        con = 2;
73
        timer = 0;
74
    }
75
}
76
if (con == 2)
77
{
78
    timer++;
79
    if (timer == 3)
80
    {
81
        
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");
82
        msgsetloc(0, 
* Time for youse to skee-daddle!Wait for inputClose Message
"* Time for youse to skee-daddle!/%", "obj_dw_teevie_audiencepits_slash_Step_0_gml_88_0"
);
83
        d_make();
84
        timer = 0;
85
        con = 3;
86
    }
87
}
88
if (con == 3 && !d_ex())
89
{
90
    if (global.flag[1149] == 0)
91
    {
92
        con = 4;
93
    }
94
    else
95
    {
96
        change = instance_create(x, y, obj_tvturnoff_manager);
97
        change.kind = 1;
98
        change.roomtarg = 161;
99
        con = 999;
100
    }
101
}
102
if (con == 4)
103
{
104
    zapper.sprite_index = spr_zapper_jump;
105
    if (zapper.image_xscale == -2)
106
    {
107
        zapper.image_xscale = 2;
108
        zapper.x -= 134;
109
    }
110
    zapper.image_index = 0;
111
    zapper.depth = -999;
112
    
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);
113
    con = 5;
114
}
115
with (obj_caterpillarchara)
116
{
117
    image_alpha = 1 - other.fade;
118
    image_blend = merge_color(c_white, c_black, other.gray / 2);
119
}
120
if (triggered)
121
{
122
    crowdvolume = lerp(crowdvolume, 1, 0.25);
123
    activechase = true;
124
}
125
else
126
{
127
    crowdvolume = lerp(crowdvolume, 0, 0.25);
128
    activechase = false;
129
}
130
var forcevol = -1;
131
if (global.interact != 0)
132
    forcevol = 0;
133
snd_volume(crowdcheer, crowdvolume, 0);
134
if (forcevol != -1)
135
    snd_volume(crowdcheer, forcevol, 0);