Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_teevie_cameras_Create_0

(view raw script w/o annotations or w/e)
1
glitz_active = false;
2
var y_offset = -40;
3
bg_height = sprite_get_height(spr_dw_couch_bg_parallax_layer_1) * 2;
4
timer = 0;
5
ooaatimer = 0;
6
timer_max = 30;
7
ooaa_max = 60;
8
threshold_vertical = (y - 20) + 60;
9
max_vertical_threshold = 80;
10
if (room == room_dw_tv_curtain)
11
{
12
    threshold_vertical = y;
13
    max_vertical_threshold = 160;
14
}
15
threshold_left = x;
16
threshold_right = x + (20 * image_xscale);
17
audience_sfx[0] = snd_init("berdly_audience.ogg");
18
audience_sfx[1] = -4;
19
var size = image_xscale;
20
if (image_xscale < 3)
21
    size = 3;
22
y_offset = 0;
23
if (room == room_dw_tv_curtain)
24
    y_offset = 40;
25
cheer_audience = instance_create(x, y + y_offset, obj_dw_teevie_cameras_cheer);
26
cheer_audience.depth = 6010;
27
cheer_audience.image_xscale = size;
28
with (cheer_audience)
29
    init_crowd();
30
camera_crowd = 0;
31
camera_crowd = instance_create(x, y, obj_dw_teevie_cameras_crowd);
32
camera_crowd.image_xscale = size;
33
camera_crowd.depth = 1000301;
34
with (camera_crowd)
35
    init_crowd();
36
disable = false;
37
neverwork = false;
38
if (
scr_ch3_violencecheck
scr_ch3_violencecheck

function
scr_ch3_violencecheck()
{ var __violence = 0; if (global.flag[580] == 1) __violence++; if (global.flag[581] == 1) __violence++; if (global.flag[582] == 1) __violence++; if (global.flag[583] == 1) __violence++; if (global.flag[584] == 1) __violence++; if (global.flag[586 encount_zapper_shuttah] == 1) __violence++; if (global.flag[587 encount_first_watercooler] == 1) __violence++; if (global.flag[588] == 1) __violence++; if (global.flag[589 encount_first_zapper] == 1) __violence++; if (global.flag[590 encount_first_shadowguy] == 1) __violence++; if (global.flag[591 encount_first_ribbick] == 1) __violence++; if (global.flag[592 encount_second_watercooler] == 1) __violence++; if (global.flag[593 encount_second_ribbick] == 1) __violence++; debug_message("
scr_ch3_violencecheck() - Violence count: " + string(__violence));
return __violence; }
() >= 5)
39
{
40
    disable = true;
41
    neverwork = true;
42
    if (room == room_dw_teevie_intro || room == room_dw_teevie_large_01)
43
    {
44
        with (obj_dw_teevie_cameras_crowd)
45
            instance_destroy();
46
        with (obj_dw_teevie_cameras_cheer)
47
            instance_destroy();
48
        instance_destroy();
49
    }
50
}