Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_room_teevie_rhythm_Create_0

(view raw script w/o annotations or w/e)
1
var xoff = 320;
2
makeshads = true;
3
if (scr_enemylostcheck("shad"))
4
    makeshads = false;
5
if (global.flag[1147 lawnmower_beat_paper] == 0 || global.flag[1147 lawnmower_beat_paper] == 20)
6
    makeshads = false;
7
bg_vfx = instance_create(xoff, -20, obj_dw_teevie_rhythm_bg);
8
with (bg_vfx)
9
    depth = 10000000;
10
if (makeshads)
11
{
12
    var _shadowguy_left_a = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(60 + xoff, 140, spr_shadowman_sax_a);
13
    with (_shadowguy_left_a)
14
    {
15
        
scr_flip
scr_flip

function
scr_flip(arg0)
{ if (arg0 == "h" || arg0 == "x") { x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale); image_xscale = -image_xscale; } else { y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale); image_yscale = -image_yscale; } }
("x");
16
        
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
17
        image_speed = 0.2;
18
    }
19
    var _shadowguy_right_a = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(470 + xoff, 140, spr_shadowman_sax_a);
20
    with (_shadowguy_right_a)
21
    {
22
        
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
23
        image_speed = 0.2;
24
    }
25
    var _shadowguy_middle = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(260 + xoff, 165, spr_shadowman_spare);
26
    with (_shadowguy_middle)
27
    {
28
        
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
29
        image_speed = 0.1;
30
    }
31
    var _shadowguy_left_b = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(140 + xoff, 165, spr_shadowman_sax_bunny);
32
    with (_shadowguy_left_b)
33
    {
34
        
scr_flip
scr_flip

function
scr_flip(arg0)
{ if (arg0 == "h" || arg0 == "x") { x += ((sprite_get_width(sprite_index) - (sprite_get_xoffset(sprite_index) * 2)) * image_xscale); image_xscale = -image_xscale; } else { y += ((sprite_get_height(sprite_index) - (sprite_get_yoffset(sprite_index) * 2)) * image_yscale); image_yscale = -image_yscale; } }
("x");
35
        
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
36
        image_speed = 0.2;
37
    }
38
    var _shadowguy_right_b = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(380 + xoff, 165, spr_shadowman_sax_bunny);
39
    with (_shadowguy_right_b)
40
    {
41
        
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
42
        image_speed = 0.2;
43
    }
44
}
45
siner = 0;
46
anim_index = 0;
47
base_y_pos = cameray() + view_hport[0] + 200;
48
base_x_scale = 2;
49
base_y_scale = 2;
50
audience_active = false;
51
audience_show = false;
52
audience_hide = false;
53
audience_hide_slow = false;
54
audience_pause = false;
55
audience_bounce = false;
56
audience_bounce_stop = true;
57
move_timer = 0;
58
x_offset = 0;
59
rose_throw = false;
60
rose_throw_time = 20;
61
rose_throw_timer = rose_throw_time;
62
rose_throw_full_width = false;
63
debug_timer = 0;
64
depth = 96000;
65
blend_mode = 16777215;
66
siner_speed = 0.15;
67
follow = true;
68
threshold_left = 0;
69
threshold_right = room_width;
70
drawcrowd = true;
71
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)
72
    drawcrowd = false;
73
emitter = audio_emitter_create();
74
if (drawcrowd)
75
{
76
    cheer_audio[0] = snd_init("berdly_audience.ogg");
77
    cheer_audio[1] = audio_play_sound_on(emitter, cheer_audio[0], true, 0);
78
}