Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_ch5_DW30_flashback_Create_0

(view raw script w/o annotations or w/e)
1
_current_state = "none";
2
_text_color = 16777215;
3
_bg = 
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; }
(-100, -10, spr_pixel_white);
4
_bg.image_xscale = 999;
5
_bg.image_yscale = 999;
6
_bg.depth = 100;
7
_bg.image_blend = c_black;
8
_bg.visible = 1;
9
_bg.image_alpha = 0;
10
_bg_red = 
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; }
(-100, -10, spr_pixel_white);
11
_bg_red.image_xscale = 999;
12
_bg_red.image_yscale = 999;
13
_bg_red.depth = _bg.depth - 10;
14
_bg_red.image_blend = c_red;
15
_bg_red.visible = 1;
16
_bg_red.image_alpha = 0;
17
_fountain = 
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; }
(0, 0, spr_dw_fountain_tall);
18
_fountain.depth = _bg.depth - 10;
19
with (_fountain)
20
{
21
    image_speed = 0.2;
22
    visible = 0;
23
}
24
_silo_asgore = instance_create(238, 638, obj_marker_fogblend);
25
_silo_asgore.depth = _fountain.depth - 10;
26
with (_silo_asgore)
27
{
28
    color = c_yellow;
29
    sprite_index = spr_asgored;
30
    image_speed = 0;
31
    image_alpha = 0;
32
    image_xscale = 2;
33
    image_yscale = 2;
34
}
35
_silo_asgore_red = instance_create(_silo_asgore.x, _silo_asgore.y, obj_marker_fogblend);
36
_silo_asgore_red.depth = _silo_asgore.depth - 10;
37
with (_silo_asgore_red)
38
{
39
    blendmode = 0;
40
    color = c_red;
41
    sprite_index = spr_asgored;
42
    image_speed = 0;
43
    image_alpha = 0;
44
    image_xscale = 2;
45
    image_yscale = 2;
46
}
47
_silo_kris = instance_create(100, 500, obj_marker_fogblend);
48
_silo_kris.depth = _fountain.depth - 10;
49
with (_silo_kris)
50
{
51
    color = c_aqua;
52
    sprite_index = spr_flashback_little_01;
53
    image_speed = 0;
54
    image_alpha = 0;
55
    image_xscale = 2;
56
    image_yscale = 2;
57
}
58
_silo_asriel = instance_create(100, 500, obj_marker_fogblend);
59
_silo_asriel.depth = _fountain.depth - 10;
60
with (_silo_asriel)
61
{
62
    color = c_green;
63
    sprite_index = spr_flashback_little_02;
64
    image_speed = 0;
65
    image_alpha = 0;
66
    image_xscale = 2;
67
    image_yscale = 2;
68
}
69
_silo_toriel = instance_create(100, 500, obj_marker_fogblend);
70
_silo_toriel.depth = _fountain.depth - 10;
71
with (_silo_toriel)
72
{
73
    color = #7B7BDD;
74
    sprite_index = spr_toriel_d;
75
    image_speed = 0;
76
    blend_mode = 0;
77
    image_alpha = 0;
78
    image_xscale = 2;
79
    image_yscale = 2;
80
}
81
_papers = instance_create(0, 0, obj_ch5_DW30_papers);
82
_convo_index = 0;
83
_convo_text = [];
84
_convo_text[0] = [stringsetloc(
* Kris.
"* Kris.", "obj_ch5_DW30_flashback_slash_Create_0_gml_97_0"
), stringsetloc(
* ...Delay 11 ever since that horrible day...
"* ..^1. ever since that horrible day...", "obj_ch5_DW30_flashback_slash_Create_0_gml_98_0"
), stringsetloc(
* I've...Delay 11 only blamed myself for what happened.
"* I've..^1. only blamed myself for what happened.", "obj_ch5_DW30_flashback_slash_Create_0_gml_99_0"
)];
85
_convo_text[1] = [stringsetloc(
* All I ever wanted
"* All I ever wanted", "obj_ch5_DW30_flashback_slash_Create_0_gml_102_0"
), stringsetloc(
* Was to prove it wasn't my fault.
"* Was to prove it wasn't my fault.", "obj_ch5_DW30_flashback_slash_Create_0_gml_103_0"
)];
86
_convo_text[2] = [stringsetloc(
* To make sure that it would never happen again.
"* To make sure that it would never happen again.", "obj_ch5_DW30_flashback_slash_Create_0_gml_106_0"
), stringsetloc(
* That it was all because of...
"* That it was all because of...", "obj_ch5_DW30_flashback_slash_Create_0_gml_107_0"
)];
87
_convo_text[3] = [stringsetloc(
* This.
"* This.", "obj_ch5_DW30_flashback_slash_Create_0_gml_110_0"
), stringsetloc(
* The "Dark World."
"* The \"Dark World.\"", "obj_ch5_DW30_flashback_slash_Create_0_gml_111_0"
)];
88
_convo_text[4] = [stringsetloc(
* ...Delay 11 but now that I'm finally here...
"* ..^1. but now that I'm finally here...", "obj_ch5_DW30_flashback_slash_Create_0_gml_114_0"
), stringsetloc(
* It makes me realize
"* It makes me realize", "obj_ch5_DW30_flashback_slash_Create_0_gml_115_0"
), stringsetloc(
* How pointless that all was.
"* How pointless that all was.", "obj_ch5_DW30_flashback_slash_Create_0_gml_116_0"
)];
89
_convo_text[5] = [stringsetloc(
* None of you ever blamed me.
"* None of you ever blamed me.", "obj_ch5_DW30_flashback_slash_Create_0_gml_119_0"
)];
90
_convo_text[6] = [stringsetloc(
* None of you ever said it was my fault.
"* None of you ever said it was my fault.", "obj_ch5_DW30_flashback_slash_Create_0_gml_122_0"
)];
91
_convo_text[7] = [stringsetloc(
* Even so...Delay 11 seeing the aftermath of my failure...
"* Even so..^1. seeing the aftermath of my failure...", "obj_ch5_DW30_flashback_slash_Create_0_gml_125_0"
)];
92
_convo_text[8] = [stringsetloc(
* Made my self-hatred consume me.
"* Made my self-hatred consume me.", "obj_ch5_DW30_flashback_slash_Create_0_gml_128_0"
)];
93
_convo_text[9] = [stringsetloc(
* One...Delay 11 that ultimately drove your mother away.
"* One..^1. that ultimately drove your mother away.", "obj_ch5_DW30_flashback_slash_Create_0_gml_131_0"
)];
94
_convo_text[10] = [stringsetloc(
* I thought if I could just prove it...Delay 11 prove I was right.
"* I thought if I could just prove it..^1. prove I was right.", "obj_ch5_DW30_flashback_slash_Create_0_gml_134_0"
), stringsetloc(
* It would fix everything.
"* It would fix everything.", "obj_ch5_DW30_flashback_slash_Create_0_gml_135_0"
)];
95
_convo_text[11] = [stringsetloc(
* But even when I finally found that "proof" I wanted...
"* But even when I finally found that \"proof\" I wanted...", "obj_ch5_DW30_flashback_slash_Create_0_gml_138_0"
)];
96
_convo_text[12] = [stringsetloc(
* ...Delay 11 I still failed to protect you.
"* ..^1. I still failed to protect you.", "obj_ch5_DW30_flashback_slash_Create_0_gml_141_0"
)];
97
98
bg_fade_in = function()
99
{
100
    with (_bg)
101
        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; 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_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("image_alpha", 0, 1, 60);
102
};
103
104
bg_stab = function()
105
{
106
    snd_play_x(snd_ominous_stab_harsh_2, 0.5, 1);
107
    _bg_red.image_alpha = 1;
108
    _text_color = 0;
109
};
110
111
bg_stab_fade = function()
112
{
113
    with (_bg_red)
114
        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; 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_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("image_alpha", 1, 0, 90);
115
    _text_color = 16777215;
116
};
117
118
show_fountain = function()
119
{
120
    snd_play(snd_fountain_make_mini);
121
    with (_fountain)
122
    {
123
        x = 280;
124
        y = cameray() - 100;
125
        visible = 1;
126
    }
127
};
128
129
fountain_fade_out = function()
130
{
131
    with (_fountain)
132
        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; 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_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("image_alpha", 1, 0, 30);
133
};
134
135
fade_in_silo = function(arg0)
136
{
137
    var fade_speed = 30;
138
    var target = -4;
139
    switch (arg0)
140
    {
141
        case "kris":
142
            target = _silo_kris;
143
            target.x = _silo_asgore.x - 50;
144
            target.y = 706;
145
            break;
146
        case "asriel":
147
            target = _silo_asriel;
148
            target.x = _silo_asgore.x - 100;
149
            target.y = _silo_asgore.y + 48;
150
            break;
151
        case "toriel":
152
            target = _silo_toriel;
153
            target.x = _silo_asgore.x + 100;
154
            target.y = _silo_asgore.y + 18;
155
            break;
156
        case "asgore_red":
157
            target = _silo_asgore_red;
158
            target.x = (camerax() + (view_wport[0] / 2)) - 42;
159
            target.y = (cameray() + (view_hport[0] / 2)) - 80;
160
            fade_speed = 60;
161
            break;
162
        default:
163
            target = _silo_asgore;
164
            target.x = (camerax() + (view_wport[0] / 2)) - 42;
165
            target.y = (cameray() + (view_hport[0] / 2)) - 80;
166
            break;
167
    }
168
    with (target)
169
        scr_lerp_var_instance(id, "image_alpha", 0, 1, fade_speed);
170
};
171
172
fade_out_silo = function(arg0)
173
{
174
    var fade_speed = 60;
175
    var target = -4;
176
    switch (arg0)
177
    {
178
        case "kris":
179
            target = _silo_kris;
180
            break;
181
        case "asriel":
182
            target = _silo_asriel;
183
            break;
184
        case "toriel":
185
            target = _silo_toriel;
186
            break;
187
        case "asgore_red":
188
            target = _silo_asgore_red;
189
            _silo_asgore.visible = 0;
190
            break;
191
        default:
192
            target = _silo_asgore;
193
            break;
194
    }
195
    with (target)
196
        scr_lerp_var_instance(id, "image_alpha", 1, 0, fade_speed);
197
    if (arg0 == "asgore_red")
198
    {
199
        
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; } function scr_script_delayed_until() { var __scriptdelay = instance_create(0, 0, obj_script_delayed_function); __scriptdelay.script = argument[0]; __scriptdelay.condition = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; } function delay_function(arg0, arg1) { return
scr_script_delayed(arg0, arg1);
}
(scr_lerp_var_instance, fade_speed, _bg, "image_alpha", 1, 0, 60);
200
        
scr_var_delay
scr_var_delay

function
scr_var_delay(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
} function scr_var_delayed(arg0, arg1, arg2) {
scr_script_delayed(scr_var, arg2, arg0, arg1);
} function scr_delay_var(arg0, arg1, arg2) {
scr_script_delayed(scr_var, arg2, arg0, arg1);
} function scr_delay_var_until(arg0, arg1, arg2) { scr_script_delayed_until(scr_var, arg2, arg0, arg1); }
("_current_state", "finished", fade_speed + 60 + 1);
201
    }
202
};
203
204
show_papers = function()
205
{
206
    _papers.show();
207
};
208
209
show_lines = function()
210
{
211
    _papers.show_lines();
212
};
213
214
grow_papers = function()
215
{
216
    _papers.grow_papers();
217
};
218
219
fade_out_papers = function()
220
{
221
    _papers.fade_papers();
222
};
223
224
dequeue_text = function()
225
{
226
    _current_state = "text";
227
    global.typer = 89;
228
    global.fc = 0;
229
    var lines = _convo_text[_convo_index];
230
    for (var i = 0; i < array_length(lines); i++)
231
    {
232
        global.msg[i] = lines[i];
233
        if (i < (array_length(lines) - 1))
234
            global.msg[i] += "/";
235
        else
236
            global.msg[i] += "/%";
237
    }
238
    var _writer = instance_create(camerax() + 70, cameray() + 320, obj_writer);
239
    _writer.mycolor = _text_color;
240
    _convo_index++;
241
};
242
243
clean_up = function()
244
{
245
    with (_papers)
246
        clean_up();
247
    with (_bg)
248
        instance_destroy();
249
    with (_bg_red)
250
        instance_destroy();
251
    with (_fountain)
252
        instance_destroy();
253
    with (_silo_asgore)
254
        instance_destroy();
255
    with (_silo_asgore_red)
256
        instance_destroy();
257
    with (_silo_kris)
258
        instance_destroy();
259
    with (_silo_asriel)
260
        instance_destroy();
261
    with (_silo_toriel)
262
        instance_destroy();
263
    instance_destroy();
264
};