Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_teevie_cameras_crowd_Create_0

(view raw script w/o annotations or w/e)
1
siner = 0;
2
current_y_pos = y;
3
target_y_pos = y;
4
move_speed = 0.4;
5
top_pos = 0;
6
bottom_pos = 0;
7
hover_active = false;
8
x_offset = 20;
9
10
init_crowd = function()
11
{
12
    target_y_pos = y + 300;
13
    hover_active = false;
14
    top_pos = y - 60;
15
    bottom_pos = top_pos + 80;
16
};
17
18
show_crowd = function()
19
{
20
    target_y_pos = y - 60;
21
};
22
23
hide_crowd = function()
24
{
25
    var sinkamt = 80;
26
    if (room == room_dw_tv_curtain)
27
        sinkamt = 100;
28
    target_y_pos += sinkamt;
29
};
30
31
init = 0;
32
type = 0;
33
active = false;
34
wasactive = false;
35
anim_speed = 0;
36
siner_speed = 0;
37
if (room == room_dw_teevie_audiencepits || room == room_dw_teevie_lightmaze)
38
    type = 1;
39
if (type == 1)
40
{
41
    depth = 100000 - ((y + 280 + 40) * 10);
42
    depth = 0;
43
    depth = layer_get_depth("BGCOLOR") - 5000;
44
    image_xscale = ((image_xscale * 32) / 40) + 2;
45
}
46
neverwork = false;
47
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)
48
{
49
    neverwork = true;
50
    disable = true;
51
    type = 999;
52
}
53
init = 0;