Deltarune script viewer

← back to main script listing

gml_Object_obj_legend_neo_Draw_0

(view raw script w/o annotations or w/e)
1
if (scr_debug
scr_debug

function scr_debug() { if (global.debug == 1) return 1; }
())
2
{
3
    if (keyboard_check_pressed(vk_backspace))
4
    {
5
        snd_free_all();
6
        room_restart();
7
    }
8
}
9
if (drawpic == 1)
10
{
11
    draw_sprite_ext(pic, 0, picx, picy, 1, 1, 0, c_white, ceil(con_alph * 4) / 4);
12
    draw_sprite_ext(picb, 0, picxb, picyb, 1, 1, 0, c_white, ceil(con_alphb * 4) / 4);
13
}
14
if (con == 3)
15
{
16
    pic = spr_introimage2;
17
    picb = 314;
18
    picyb = -50;
19
    con = 3.1;
20
    con_alphb = 0;
21
    contimer = -100;
22
    chunkfade = 0;
23
    drawpic = 1;
24
    flamecon = 0;
25
    flamesiner = 0;
26
    flamealph = 1;
27
    flamey = 0;
28
    global.typer = 41;
29
}
30
if (con == 3.1)
31
{
32
    if (con_alph < 1 && contimer < 200)
33
        con_alph += 0.01;
34
    flamesiner++;
35
    contimer++;
36
    if (contimer == 20)
37
    {
38
        msgsetloc(0, 
When the LIGHT is
subsumed by SHADOW
"When the LIGHT is&subsumed by SHADOW", "obj_legend_neo_slash_Draw_0_gml_38_0"
);
39
        wx = 88;
40
        if (jp)
41
            wx = 62;
42
        w = instance_create(wx, 185, obj_writer);
43
    }
44
    if (contimer == 200)
45
    {
46
        with (w)
47
            instance_destroy();
48
        msgsetloc(0, 
When the FOUNTAINS fill the sky
"When the FOUNTAINS fill the sky", "obj_legend_neo_slash_Draw_0_gml_46_0"
);
49
        wx = 37;
50
        if (jp)
51
            wx = 83;
52
        w = instance_create(wx, 185, obj_writer);
53
    }
54
    if (contimer >= 200 && contimer <= 300)
55
    {
56
        if (con_alphb < 1)
57
            con_alphb += 0.02;
58
        if (picyb < 0)
59
            picyb += 0.5;
60
        if (picy < 80)
61
            picy += 0.5;
62
    }
63
    if (contimer == 400)
64
    {
65
        flamecon = 1;
66
        flamealph = 0.7;
67
        wave_siner = 0;
68
        flameya = room_height - 30;
69
        flameyb = room_height;
70
        wave_maxa = sprite_get_height(spr_cutscene_27_3_fire_1);
71
        wave_maxb = sprite_get_height(spr_cutscene_27_3_fire_2);
72
        with (w)
73
            instance_destroy();
74
        msgsetloc(0, 
All will fall into CHAOS.
"All will fall into CHAOS.", "obj_legend_neo_slash_Draw_0_gml_69_0"
);
75
        wx = 63;
76
        if (jp)
77
            wx = 55;
78
        w = instance_create(wx, 185, obj_writer);
79
    }
80
    if (contimer == 600)
81
    {
82
        with (w)
83
            instance_destroy();
84
        pic = picb;
85
        picy = picyb;
86
        pic = picb;
87
        con_alphb = 0;
88
        picb = 315;
89
        msgsetloc(0, 
The TITANS will take
form from the FOUNTAINS
"The TITANS will take&form from the FOUNTAINS", "obj_legend_neo_slash_Draw_0_gml_80_0"
);
90
        wx = 69;
91
        if (jp)
92
            wx = 65;
93
        w = instance_create(wx, 185, obj_writer);
94
    }
95
    if (contimer >= 600 && contimer <= 680)
96
    {
97
        if (con_alphb < 1)
98
            con_alphb += 0.01;
99
    }
100
    if (contimer == 800)
101
    {
102
        pic = picb;
103
        picy = picyb;
104
        pic = picb;
105
        con_alphb = 0;
106
        picb = 316;
107
        with (w)
108
            instance_destroy();
109
        msgsetloc(0, 
And envelop
the land in devastation.
" And envelop& the land in devastation.", "obj_legend_neo_slash_Draw_0_gml_99_0"
);
110
        wx = 43;
111
        if (jp)
112
            wx = 48;
113
        w = instance_create(wx, 185, obj_writer);
114
    }
115
    if (contimer >= 800 && contimer <= 980)
116
    {
117
        if (con_alphb < 1)
118
            con_alphb += 0.01;
119
    }
120
    if (contimer >= 1030 && contimer <= 1130)
121
    {
122
        with (w)
123
            instance_destroy();
124
        con_alph = 0;
125
        if (con_alphb > 0)
126
            con_alphb -= 0.01;
127
        if (flamealph > 0)
128
            flamealph -= 0.01;
129
    }
130
    if (contimer == 1160)
131
    {
132
        contimer = 0;
133
        con = 4;
134
    }
135
    if (flamecon == 1)
136
    {
137
        if (flameya > (room_height - wave_maxa))
138
            flameya -= 1.5;
139
        if (flameyb > (room_height - wave_maxb))
140
            flameyb--;
141
        thickness = 2;
142
        wave_siner++;
143
        flamesiner++;
144
        draw_set_alpha(flamealph);
145
        for (i = 0; i < wave_maxa; i += thickness)
146
            draw_sprite_part(spr_cutscene_27_3_fire_1, 0, 0, i * thickness, 400, thickness + 2, -10 + (sin((wave_siner + (i * 8)) / 30) * 12), (i * thickness) + flameya + (sin(flamesiner / 16) * 3));
147
        draw_set_alpha(1);
148
    }
149
}
150
if (con == 4)
151
{
152
    con = 5;
153
    contimer = 0;
154
    pic = spr_cutscene_27_4;
155
    picb = 320;
156
    con_alph = 0;
157
    con_alphb = 0;
158
    picx = 48;
159
    picy = 60;
160
    picxb = 48;
161
    picyb = 60;
162
    global.typer = 41;
163
}
164
if (con == 5)
165
{
166
    contimer++;
167
    if (contimer == 30)
168
    {
169
        msgsetloc(0, 
The surviving Darkners,
crushed by the darkness
"The surviving Darkners,&crushed by the darkness", "obj_legend_neo_slash_Draw_0_gml_167_0"
);
170
        wx = 69;
171
        if (jp)
172
            wx = 58;
173
        w = instance_create(wx, 185, obj_writer);
174
    }
175
    if (contimer <= 100)
176
    {
177
        if (con_alph <= 1)
178
            con_alph += 0.01;
179
    }
180
    if (contimer == 240)
181
    {
182
        with (w)
183
            instance_destroy();
184
        msgsetloc(0, 
Will slowly, one by one,
turn into statues...
"Will slowly, one by one,&turn into statues...", "obj_legend_neo_slash_Draw_0_gml_180_0"
);
185
        wx = 67;
186
        if (jp)
187
            wx = 55;
188
        w = instance_create(wx, 185, obj_writer);
189
    }
190
    if (contimer >= 240 && contimer <= 360)
191
    {
192
        if (con_alphb <= 1)
193
            con_alphb += 0.01;
194
    }
195
    if (contimer == 420)
196
    {
197
        pic = picb;
198
        picb = 321;
199
        con_alphb = 0;
200
        with (w)
201
            instance_destroy();
202
        msgsetloc(0, 
Leaving the Lightners
to fend for themselves
"Leaving the Lightners&to fend for themselves", "obj_legend_neo_slash_Draw_0_gml_196_0"
);
203
        wx = 73;
204
        if (jp)
205
            wx = 58;
206
        w = instance_create(wx, 185, obj_writer);
207
    }
208
    if (contimer >= 420 && contimer <= 520)
209
    {
210
        if (con_alphb <= 1)
211
            con_alphb += 0.01;
212
    }
213
    if (contimer == 600)
214
    {
215
        pic = picb;
216
        picb = 322;
217
        con_alphb = 0;
218
        with (w)
219
            instance_destroy();
220
        msgsetloc(0, 
Lost eternally in an
endless night...
"Lost eternally in an& endless night...", "obj_legend_neo_slash_Draw_0_gml_211_0"
);
221
        wx = 81;
222
        if (jp)
223
            wx = 69;
224
        w = instance_create(wx, 185, obj_writer);
225
    }
226
    if (contimer >= 600 && contimer <= 700)
227
    {
228
        if (con_alphb <= 1)
229
            con_alphb += 0.01;
230
    }
231
    if (contimer == 840)
232
    {
233
        pic = picb;
234
        con_alphb = 0;
235
        with (w)
236
            instance_destroy();
237
        msgsetloc(0, 
Is that your idea
of paradise?
"Is that your idea& of paradise?", "obj_legend_neo_slash_Draw_0_gml_225_0"
);
238
        snd_volume(global.currentsong[1], 0, 200);
239
        wx = 103;
240
        if (jp)
241
            wx = 90;
242
        w = instance_create(wx, 185, obj_writer);
243
    }
244
    if (contimer >= 840)
245
        con_alph -= 0.01;
246
    if (contimer == 1080)
247
        instance_create(0, 0, obj_fadeout);
248
    if (contimer == 1100 && skipped == 0)
249
    {
250
        snd_free_all();
251
        global.flag[6 disable_text_skip] = 0;
252
        instance_create(0, 0, obj_persistentfadein);
253
        if (scr_sideb_get_phase
scr_sideb_get_phase

function scr_sideb_get_phase() { var phase = 0; if (global.flag[916 snowgrave_fail] == 0) { if (global.flag[915 snowgrave_plot] > 0 && global.flag[915 snowgrave_plot] < 4) phase = 1; if (global.flag[915 snowgrave_plot] >= 4 && global.flag[915 snowgrave_plot] < 7) phase = 2; if (global.flag[915 snowgrave_plot] >= 7 && global.flag[915 snowgrave_plot] < 20) phase = 3; if (global.flag[915 snowgrave_plot] >= 20) phase = 4; } return phase; }
() < 2)
254
            room_goto(room_dw_mansion_top_post );
255
        else
256
            room_goto(room_dw_mansion_top );
257
    }
258
}
259
if (border == 1)
260
{
261
    draw_set_color(c_black);
262
    draw_rectangle(-10, -10, 330, 27, false);
263
    draw_rectangle(-10, -10, 59, 300, false);
264
    draw_rectangle(400, -10, 260, 300, false);
265
    draw_rectangle(-10, 400, 330, 138, false);
266
}
267
if (border == 2)
268
{
269
    draw_set_color(c_black);
270
    draw_rectangle(-10, 180, 999, 482, false);
271
}
272
if (chunkfade == 0 && chunkamt > 0)
273
    chunkamt -= fadespeed;
274
if (chunkfade == 1 && chunkamt < 1)
275
    chunkamt += fadespeed;
276
draw_set_color(fadecolor);
277
alph = 0;
278
if (chunkamt >= 0.25)
279
    alph = 0.25;
280
if (chunkamt >= 0.5)
281
    alph = 0.5;
282
if (chunkamt >= 0.75)
283
    alph = 0.75;
284
if (chunkamt >= 1)
285
    alph = 1;
286
draw_set_alpha(alph);
287
draw_rectangle(-10, -10, 330, 330, false);
288
draw_set_alpha(1);
289
if (ingame == 0)
290
{
291
    if (button1_p() && skipped == 0)
292
    {
293
        skipped = 1;
294
        skiptimer = 0;
295
        f = instance_create(0, 0, obj_fadeout);
296
        f.fadespeed = 0.08;
297
        mus_volume(global.currentsong[1], 0, 15);
298
    }
299
    if (skipped == 1)
300
        skiptimer += 1;
301
    if (skiptimer == 19)
302
    {
303
        snd_free(global.currentsong[0]);
304
        global.flag[6 disable_text_skip] = 0;
305
    }
306
    if (skiptimer == 20)
307
        room_goto(PLACE_LOGO );
308
}