Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_ch5_LW20W_Create_0

related scripts: Alarm_0Create_0 Step_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
customcon = 0;
3
blackall = 
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; }
(-10, -10, spr_pixel_white);
4
blackall.image_xscale = 999;
5
blackall.image_yscale = 999;
6
blackall.depth = 4000;
7
blackall.image_blend = c_black;
8
_rotate_vfx = -4;
9
if (i_ex(obj_ch5_LW20W_rotate))
10
    _rotate_vfx = instance_find(obj_ch5_LW20W_rotate, 0);
11
_blur_vfx = -4;
12
_blue_vfx = -4;
13
_white_vfx = -4;
14
_crt_vfx = -4;
15
_slow_text_active = true;
16
_proceed_enabled = false;
17
_proceed_timer = 0;
18
_proceed_time = 20;
19
_proceed_pause = false;
20
_proceed_text_active = false;
21
_whiteout_finished = false;
22
_water_counter = 0;
23
_proceed_counter = 0;
24
_bgm_track = [];
25
_bgm_pitch = 0.6;
26
_bgm_volume = 0.2;
27
_text_rate = 2;
28
oceansong = [];
29
voice_pitch = -1;
30
_shadow_kris = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(0, 0, spr_kris_sunset_shadow);
31
var shadow_x_kris = obj_mainchara.x + 12;
32
var shadow_y_kris = (obj_mainchara.y + sprite_get_height(obj_mainchara.sprite_index)) - 1;
33
with (_shadow_kris)
34
{
35
    x = shadow_x_kris;
36
    y = shadow_y_kris;
37
    
scr_stickto
scr_stickto

function
scr_stickto(arg0, arg1)
{ _stickto = instance_create(0, 0, obj_stickto); _stickto.stickingobj = id; _stickto.stucktoobj = arg0; _stickto.relativedepth = arg1; with (_stickto) event_user(0); }
(obj_mainchara, 10);
38
}
39
_shadow_noelle = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(0, 0, spr_noelle_sunset_shadow_tall);
40
if (global.tempflag[55] == 0)
41
{
42
    global.interact = 1;
43
    _rotate_vfx = instance_create(0, 0, obj_ch5_LW20W_rotate);
44
    with (_rotate_vfx)
45
        init();
46
}
47
else
48
{
49
    con = 0;
50
    global.interact = 0;
51
    with (_rotate_vfx)
52
        persistent = false;
53
    _blur_vfx = instance_create(0, 0, obj_ch5_LW20W_blur);
54
    _blur_vfx.visible = 0;
55
    _blue_vfx = instance_create(0, 0, obj_ch5_LW20W_blue);
56
    _white_vfx = instance_create(0, 0, obj_ch5_LW20W_white);
57
    _crt_vfx = instance_create(0, 0, obj_ch5_LW20W_crt);
58
    _crt_vfx.visible = 0;
59
    global.tempflag[55] = 0;
60
    scr_lerp_instance_var(blackall, "image_alpha", 1, 0, 60);
61
    snd_free_all();
62
    oceansong[0] = snd_init("ocean.ogg");
63
    oceansong[1] = mus_loop(oceansong[0]);
64
    mus_volume(oceansong[1], 0, 0);
65
    mus_volume(oceansong[1], 0.5, 30);
66
    var left_block = instance_create(-20, 0, obj_solidblockLight);
67
    with (left_block)
68
        image_yscale = 18;
69
    with (obj_doorB)
70
        instance_destroy();
71
    _vfx = instance_create(0, 0, obj_ch5_LW20W_vfx);
72
    _noelle_marker = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(384, 98, spr_noelle_silo_right);
73
    with (_noelle_marker)
74
    {
75
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
76
        image_speed = 0.2;
77
    }
78
    var shadow_x_noelle = _noelle_marker.x + 14;
79
    var shadow_y_noelle = (_noelle_marker.y + sprite_get_height(_noelle_marker.sprite_index)) - 3;
80
    with (_shadow_noelle)
81
    {
82
        x = shadow_x_noelle;
83
        y = shadow_y_noelle;
84
    }
85
    _shadow_noelle.depth = _noelle_marker.depth - 1;
86
    _trigger = instance_create(250, 80, obj_trigger);
87
    with (_trigger)
88
        image_yscale = 12;
89
}
90
91
show_choice = function()
92
{
93
    con = 10;
94
    k_d(1);
95
    global.msc = -99;
96
    global.choice = -1;
97
    global.choicemsg = [stringsetloc(
#Stop
"#Stop", "obj_ch5_LW20W_slash_Create_0_gml_136_0"
), stringsetloc(
#Proceed
"#Proceed", "obj_ch5_LW20W_slash_Create_0_gml_137_0"
), stringset(""), stringset("")];
98
    
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 == "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 (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
99
    msgset(0, "\\C2");
100
    d_make();
101
};
102
103
show_proceed = function()
104
{
105
    con = 30;
106
    _proceed_pause = false;
107
    _proceed_timer = _proceed_time * 30;
108
    _white_vfx.init(id);
109
    _white_vfx.proceed();
110
    show_debug_message("_proceed_time " + string(_proceed_time) + " | _proceed_timer " + string(_proceed_timer));
111
    _proceed_time = clamp(_proceed_time - 5, 1.5, 20);
112
    k_d(1);
113
    global.msc = -99;
114
    global.choice = -1;
115
    global.choicemsg = [stringsetloc(
#Proceed
"#Proceed", "obj_ch5_LW20W_slash_Create_0_gml_177_0"
), stringsetloc(
#Proceed
"#Proceed", "obj_ch5_LW20W_slash_Create_0_gml_178_0"
), stringset(""), stringset("")];
116
    
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 == "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 (global.darkzone == 1) global.typer = 89; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
117
    msgset(0, "\\C2");
118
    d_make();
119
};
120
121
trigger_event = function(arg0)
122
{
123
    switch (arg0)
124
    {
125
        case "failed":
126
            break;
127
        case "whiteout_finished":
128
            _whiteout_finished = true;
129
            break;
130
    }
131
};
132
133
lake_chant = function()
134
{
135
    if (_water_counter < 6)
136
        exit;
137
    if (_bgm_track[0] == -4)
138
    {
139
        _bgm_track[0] = snd_init("ch5_inversion_lake_chant.ogg");
140
        _bgm_track[1] = mus_loop_ext(_bgm_track[0], 1, 1);
141
        mus_volume(_bgm_track[1], 0, 0);
142
        snd_pitch(_bgm_track[1], 0);
143
    }
144
    snd_pitch_time(_bgm_track[1], _bgm_pitch, 30);
145
    mus_volume(_bgm_track[1], _bgm_volume, 30);
146
    _bgm_pitch = clamp(_bgm_pitch - 0.05, 0.05, 1);
147
    _bgm_volume = clamp(_bgm_volume + 0.1, 0.1, 1);
148
};
149
150
handoff = 0;