Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_rhythmgame_Step_0

(view raw script w/o annotations or w/e)
1
if (!hide_heroes)
2
{
3
    with (obj_mainchara)
4
        visible = 0;
5
    with (obj_caterpillarchara)
6
        visible = 0;
7
    hide_heroes = true;
8
}
9
if (freeplay < 0)
10
{
11
    if (up_p() && song_id > 0)
12
    {
13
        song_id--;
14
        snd_play(snd_menumove);
15
    }
16
    if (down_p() && song_id < (array_length(tracklist) - 1))
17
    {
18
        song_id++;
19
        snd_play(snd_menumove);
20
    }
21
    if (right_p() && !hardmode)
22
    {
23
        hardmode = true;
24
        snd_play(snd_menumove);
25
    }
26
    if (left_p() && hardmode)
27
    {
28
        hardmode = false;
29
        snd_play(snd_menumove);
30
    }
31
    if (button1_p())
32
    {
33
        freeplay = 0;
34
        bg_con = 1;
35
        effects.con = 2;
36
        with (obj_rhythmgame_spotlight_solo)
37
            con = 2;
38
        event_user(0);
39
        exit;
40
    }
41
    else
42
    {
43
        exit;
44
    }
45
}
46
if (freeplay == 2)
47
{
48
    freeplay = 1;
49
    bg_con = 1;
50
    effects.con = 2;
51
    with (obj_rhythmgame_spotlight_solo)
52
        con = 2;
53
    event_user(0);
54
}
55
if (tutorial == -1)
56
{
57
    fade = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(fade, 1, 0.05);
58
    with (obj_rhythmgame_chart)
59
        fade = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(fade, 1, 0.05);
60
    fame = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(fame, 6000, 300);
61
    if (fame == 6000 && fade == 1)
62
        tutorial = 0;
63
}
64
if (tutorial != 1 && tutorial != 2)
65
{
66
    if (tenna_boss && i_ex(obj_tenna_zoom) && obj_tenna_zoom.minigameinsanity == true)
67
    {
68
        chart_lerp = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(chart_lerp, show_chart, 0.2);
69
        chart_ease = 
scr_ease_out
scr_ease_out

function
scr_ease_out(arg0, arg1)
{ if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_out_bounce(arg0, 0, 1, 1); case -2: return ease_out_elastic(arg0, 0, 1, 1); case -1: return ease_out_back(arg0, 0, 1, 1); case 0: return arg0; case 1: return sin(arg0 * 1.5707963267948966); case 2: return -arg0 * (arg0 - 2); case 6: return -power(2, -10 * arg0) + 1; case 7: arg0--; return sqrt(1 - (arg0 * arg0)); default: arg0--; if (arg1 == 4) { return -1 * (power(arg0, arg1) - 1); break; } return power(arg0, arg1) + 1; } }
(chart_lerp, 2);
70
    }
71
    else
72
    {
73
        chart_lerp = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(chart_lerp, show_chart, 0.05);
74
        chart_ease = 
scr_ease_out
scr_ease_out

function
scr_ease_out(arg0, arg1)
{ if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_out_bounce(arg0, 0, 1, 1); case -2: return ease_out_elastic(arg0, 0, 1, 1); case -1: return ease_out_back(arg0, 0, 1, 1); case 0: return arg0; case 1: return sin(arg0 * 1.5707963267948966); case 2: return -arg0 * (arg0 - 2); case 6: return -power(2, -10 * arg0) + 1; case 7: arg0--; return sqrt(1 - (arg0 * arg0)); default: arg0--; if (arg1 == 4) { return -1 * (power(arg0, arg1) - 1); break; } return power(arg0, arg1) + 1; } }
(chart_lerp, 2);
75
    }
76
}
77
if (tutorial > 0)
78
{
79
    kchart_lerp = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(kchart_lerp, show_chart, 0.05);
80
    kchart_ease = 
scr_ease_out
scr_ease_out

function
scr_ease_out(arg0, arg1)
{ if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_out_bounce(arg0, 0, 1, 1); case -2: return ease_out_elastic(arg0, 0, 1, 1); case -1: return ease_out_back(arg0, 0, 1, 1); case 0: return arg0; case 1: return sin(arg0 * 1.5707963267948966); case 2: return -arg0 * (arg0 - 2); case 6: return -power(2, -10 * arg0) + 1; case 7: arg0--; return sqrt(1 - (arg0 * arg0)); default: arg0--; if (arg1 == 4) { return -1 * (power(arg0, arg1) - 1); break; } return power(arg0, arg1) + 1; } }
(kchart_lerp, 2);
81
}
82
else
83
{
84
    kchart_lerp = chart_lerp;
85
    kchart_ease = chart_ease;
86
}
87
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
88
{
89
    if (keyboard_check_pressed(ord("U")))
90
        event_user(4);
91
    if (keyboard_check_pressed(ord("I")) || (show_debug && (gamepad_button_check_pressed(0, gp_face3) || gamepad_button_check_pressed(1, gp_face3))))
92
    {
93
        if (tutorial > 0)
94
        {
95
            debug_print("Can not alter autoplay during tutorial");
96
        }
97
        else if (auto_play == 0)
98
        {
99
            auto_play = 1;
100
            debug_print("Autoplay enabled.");
101
        }
102
        else if (auto_play == 1)
103
        {
104
            auto_play = 0;
105
            debug_print("Autoplay disabled.");
106
        }
107
    }
108
    if (keyboard_check_pressed(ord("O")) || (show_debug && (gamepad_button_check_pressed(0, gp_select) || gamepad_button_check_pressed(1, gp_select))))
109
    {
110
        show_debug = !show_debug;
111
        if (show_debug)
112
            debug_print("debug mode enabled");
113
        else
114
            debug_print("debug mode disabled");
115
    }
116
    if (song_id == 0 && solo_con == 0)
117
    {
118
        if (keyboard_check_pressed(ord("1")))
119
        {
120
            solo_difficulty = 0;
121
            
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("Solo difficulty set to easy.");
122
        }
123
        else if (keyboard_check_pressed(ord("2")))
124
        {
125
            solo_difficulty = 1;
126
            
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("Solo difficulty set to medium.");
127
        }
128
        else if (keyboard_check_pressed(ord("3")))
129
        {
130
            solo_difficulty = 2;
131
            
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("Solo difficulty set to hard.");
132
        }
133
        else if (keyboard_check_pressed(ord("4")))
134
        {
135
            solo_difficulty = -1;
136
            
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("Solo difficulty set to auto.");
137
        }
138
    }
139
    var _vol = main_vol;
140
    if (sunkus_kb_check_pressed_with_repeat(189))
141
        _vol -= (keyboard_check(vk_lshift) ? 0.5 : 0.1);
142
    if (sunkus_kb_check_pressed_with_repeat(187))
143
        _vol += (keyboard_check(vk_lshift) ? 0.5 : 0.1);
144
    if (_vol != main_vol)
145
    {
146
        main_vol = clamp01(_vol);
147
        mus_volume(track1_instance, main_vol, 0);
148
        if (oneAtATime)
149
            mus_volume(track2_instance, 0, 0);
150
        else
151
            mus_volume(track2_instance, main_vol, 0);
152
        debug_print("Song volume set to " + string(main_vol * 100) + "%");
153
    }
154
}
155
if (song_id == 4)
156
{
157
    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
() && intro_con == 1 && keyboard_check_pressed(ord("4")))
158
        intro_con = 2;
159
}
160
if (init == 0)
161
{
162
    if (other.song_id == 4)
163
    {
164
        drums.performer.visible = false;
165
        vocals.performer.visible = false;
166
    }
167
    if (tenna_boss)
168
    {
169
        freeplay = false;
170
        replayversion = false;
171
        if (audio_is_playing(global.batmusic[1]))
172
        {
173
            trackstart = audio_sound_get_track_position(global.batmusic[1]);
174
        }
175
        else
176
        {
177
            debug_print("track start randomized");
178
            trackstart = random(82.5);
179
        }
180
        bpm = 148;
181
        notespacing = 60 / bpm;
182
        meter = notespacing * 4;
183
        chart_start = scr_ceil_to_beat(trackstart + (boss_delay / 30), bpm, 0.5);
184
        chart_end = trackstart + floor_to_multiple((turn_length - 30) / 30, meter / 2);
185
        song_id = 2;
186
        loadsong = 1;
187
        difficulty = 1;
188
        performer.sprite_index = spr_kris_guitar_ready;
189
        loop = true;
190
        with (obj_rhythmgame_chart)
191
        {
192
            target_brightness = 0.75;
193
            if (other.speed_modifier > 2)
194
                brightness = 0.75;
195
            auto_play = true;
196
            if (instrument == 1)
197
            {
198
                performer.sprite_index = spr_susie_drum_ready;
199
                performer.image_speed = 0.5;
200
            }
201
            else if (instrument == 2)
202
            {
203
                performer.sprite_index = spr_ralsei_sing_polite_closed;
204
            }
205
        }
206
        event_user(0);
207
    }
208
    init = 1;
209
}
210
if (song_id >= 0 && song_loaded == false && loadsong >= 1)
211
{
212
    scr_rhythmgame_load_song(song_id, true, true);
213
    
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("Song Loaded");
214
    if (tenna_boss)
215
    {
216
        fame_mul = 80 / maxnote;
217
        if (speed_modifier <= 2)
218
            button_alpha = 5;
219
    }
220
    notespeed *= speed_modifier;
221
    notespeed = round_to_multiple(notespeed, 30);
222
    song_loaded = true;
223
}
224
if (tenna_boss && keyboard_check_pressed(ord("V")))
225
{
226
    auto_play = true;
227
    song_done = true;
228
}
229
if (intro_con == -1)
230
    exit;
231
if (intro_con < 2)
232
    exit;
233
if (init == 1)
234
{
235
    if (tenna_boss)
236
    {
237
        loadsong = 3;
238
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("loaded tenna info");
239
        var _forceload = false;
240
        if (!audio_is_playing(global.batmusic[1]))
241
        {
242
            global.batmusic[0] = snd_init(track1_id);
243
            global.batmusic[1] = mus_loop(global.batmusic[0]);
244
            audio_sound_set_track_position(global.batmusic[1], trackstart);
245
            _forceload = true;
246
        }
247
        track1 = global.batmusic[0];
248
        track1_instance = global.batmusic[1];
249
        if (array_length(global.batmusic) <= 2 || _forceload)
250
        {
251
            
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("failsafe triggered! second stem wasn't preloaded!!!");
252
            global.batmusic[2] = snd_init(track2_id);
253
            global.batmusic[3] = mus_loop(global.batmusic[2]);
254
            audio_sound_set_track_position(global.batmusic[3], trackstart);
255
        }
256
        track2 = global.batmusic[2];
257
        track2_instance = global.batmusic[3];
258
        track1_main = track1_instance;
259
        track2_main = track2_instance;
260
        musicm.loop = true;
261
        mus_volume(track1_instance, main_vol * 0.9, 60);
262
        mus_volume(track2_instance, 0, 0);
263
        song_initialized = 1;
264
        if (v_ex("musicm"))
265
            musicm.track1_instance = track1_main;
266
    }
267
    init = 2;
268
}
269
else if (tenna_boss && init == 2)
270
{
271
    audio_sound_set_track_position(track2_instance, trackpos);
272
    init = 3;
273
}
274
if (loadsong == 1)
275
{
276
    if (tutorial >= 1 && audio_is_playing(global.currentsong[1]))
277
    {
278
        track1 = global.currentsong[0];
279
        track2 = snd_init(track2_id);
280
        trackstart = audio_sound_get_track_position(global.currentsong[1]);
281
        trackpos = trackstart;
282
    }
283
    else
284
    {
285
        track1 = snd_init(track1_id);
286
        track2 = snd_init(track2_id);
287
    }
288
    if (song_id == 0)
289
    {
290
        track1_solo = snd_init(track1_id);
291
        track2_solo = snd_init(track2_id);
292
    }
293
    loadsong = 2;
294
    playtimer = 0;
295
}
296
if (loadsong == 2)
297
{
298
    if (trackstart >= 0 || playtimer != 3)
299
        playtimer++;
300
    if (playtimer == 3 && trackstart < 0)
301
    {
302
        trackstart += ((delta_time / 1000000) * pitch);
303
        trackpos = trackstart;
304
        
scr_debug_print_persistent
scr_debug_print_persistent

function
scr_debug_print_persistent(arg0, arg1)
{ } function debug_print_persistent(arg0, arg1) { } function scr_debug_delete_persistent(arg0, arg1 = false) { } function scr_debug_clear_persistent() { }
("countdown", "countdown: " + string(trackstart));
305
        if (trackstart >= 0)
306
        {
307
            scr_debug_delete_persistent("countdown");
308
            trackstart = 0;
309
            trackpos = 0;
310
            playtimer = 4;
311
        }
312
    }
313
    if (playtimer == 4)
314
    {
315
        if (loop)
316
        {
317
            if (tutorial >= 1 && audio_is_playing(global.currentsong[1]))
318
            {
319
                track1_instance = global.currentsong[1];
320
                track2_instance = mus_loop(track2);
321
            }
322
            else
323
            {
324
                track1_instance = mus_loop(track1);
325
                track2_instance = mus_loop(track2);
326
            }
327
        }
328
        else
329
        {
330
            track1_instance = mus_play(track1);
331
            track2_instance = mus_play(track2);
332
            if (trackstart < 0)
333
            {
334
                snd_pause(track1_instance);
335
                snd_pause(track2_instance);
336
            }
337
        }
338
        if (song_id == 0)
339
        {
340
            track1_solo_instance = mus_play(track1_solo);
341
            track2_solo_instance = mus_play(track2_solo);
342
            if (trackstart < 0)
343
            {
344
                audio_pause_sound(track1_solo_instance);
345
                audio_pause_sound(track2_solo_instance);
346
            }
347
        }
348
        if (tutorial == 1)
349
        {
350
            mus_volume(track1_instance, main_vol, 0);
351
            mus_volume(track2_instance, 0, 0);
352
        }
353
        track1_main = track1_instance;
354
        track2_main = track2_instance;
355
    }
356
    if (playtimer == 5)
357
    {
358
        if (trackstart > 0)
359
        {
360
            if (tutorial > 0)
361
            {
362
                trackpos = audio_sound_get_track_position(track1_instance);
363
                audio_sound_set_track_position(track2_instance, trackpos);
364
            }
365
            else
366
            {
367
                audio_sound_set_track_position(track1_instance, trackstart);
368
                audio_sound_set_track_position(track2_instance, trackstart);
369
            }
370
            if (song_id == 0)
371
            {
372
                audio_sound_set_track_position(track1_solo_instance, trackstart);
373
                audio_sound_set_track_position(track2_solo_instance, trackstart);
374
            }
375
        }
376
        if (tutorial > 0)
377
        {
378
            mus_volume(track1_instance, main_vol, 0);
379
            mus_volume(track2_instance, 0, 0);
380
        }
381
        else if (!oneAtATime)
382
        {
383
            mus_volume(track1_instance, main_vol, 0);
384
            mus_volume(track2_instance, main_vol, 0);
385
        }
386
        else
387
        {
388
            mus_volume(track1_instance, 0, 0);
389
            mus_volume(track2_instance, main_vol, 0);
390
        }
391
        loadsong = 3;
392
        song_initialized = 1;
393
        if (song_id == 0)
394
        {
395
            mus_volume(track1_solo_instance, 0, 0);
396
            mus_volume(track2_solo_instance, 0, 0);
397
            if (!freeplay)
398
            {
399
                var _failures = global.flag[1096 rhythm_game_tries];
400
                if (_failures == 3)
401
                    difficulty = 3;
402
                else if (_failures == 4)
403
                    difficulty = 2;
404
                else if (_failures >= 5)
405
                    difficulty = 1;
406
            }
407
        }
408
        if (v_ex("musicm"))
409
            musicm.track1_instance = track1_main;
410
    }
411
}
412
if (song_initialized == 1 || (trackpos < 0 && playtimer == 3))
413
{
414
    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
() && song_initialized == 1)
415
    {
416
        if (keyboard_check_pressed(ord("P")) || (show_debug && (gamepad_button_check_pressed(0, gp_start) || gamepad_button_check_pressed(1, gp_start))))
417
        {
418
            paused = !paused;
419
            if (paused)
420
            {
421
                audio_pause_sound(track1_main);
422
                audio_pause_sound(track2_main);
423
                if (song_id == 0)
424
                {
425
                    audio_pause_sound(track1_solo);
426
                    audio_pause_sound(track2_solo);
427
                }
428
            }
429
            else
430
            {
431
                audio_resume_sound(track1_main);
432
                audio_resume_sound(track2_main);
433
                if (song_id == 0)
434
                {
435
                    audio_resume_sound(track1_solo);
436
                    audio_resume_sound(track2_solo);
437
                }
438
            }
439
        }
440
    }
441
    var _truetrackpos = 0;
442
    if (trackstart < 0)
443
    {
444
        trackpos = trackstart;
445
    }
446
    else
447
    {
448
        if (lose_con == 0 && !song_done && !paused && !snd_is_playing(track1_instance) && trackpos < (track_length - 0.5))
449
        {
450
            emergency_reload();
451
            exit;
452
        }
453
        _truetrackpos = audio_sound_get_track_position(track1_main);
454
        if (muted && muted_time != _truetrackpos)
455
        {
456
            muted = false;
457
            debug_print("huh???");
458
        }
459
        var _posdiff = _truetrackpos - trackpos;
460
        if (lose_con == 0 && !paused && _posdiff == 0 && trackpos < (track_length - 0.5))
461
        {
462
            safety_timer++;
463
            if (safety_timer >= 20)
464
            {
465
                if (!safety_mode)
466
                {
467
                    safety_mode = 1;
468
                    muted = true;
469
                    muted_time = _truetrackpos;
470
                    debug_print("safety mode engaged");
471
                }
472
            }
473
        }
474
        else if (!paused && abs(_posdiff) > 0.05 && abs(_posdiff) < 0.5 && lose_con == 0 && song_id != 4 && !muted)
475
        {
476
            if (smooth_timer == 0)
477
            {
478
                smooth_timer = 6;
479
                safety_mode = true;
480
                safety_pos = trackpos;
481
                debug_print("anti-stutter triggered (" + string(round(_posdiff * 1000)) + "ms)");
482
            }
483
            else
484
            {
485
                smooth_timer--;
486
            }
487
            if (smooth_timer == 0)
488
            {
489
                debug_print("track fixed itself");
490
                safety_mode = false;
491
            }
492
        }
493
        else if (smooth_timer > 0)
494
        {
495
            safety_pos = _truetrackpos;
496
            safety_mode = false;
497
            safety_timer = 0;
498
            smooth_timer = 0;
499
            debug_print("track re-synced");
500
        }
501
        else if (safety_timer > 0 && _posdiff != 0)
502
        {
503
            safety_timer = 0;
504
        }
505
        if (safety_mode && lose_con == 0)
506
        {
507
            if (smooth_timer > 0 && !muted)
508
            {
509
                safety_pos += (delta_time / 1000000);
510
                trackpos = remap(6, 0, safety_pos, _truetrackpos, smooth_timer);
511
            }
512
            else
513
            {
514
                trackpos += ((delta_time / 1000000) * pitch);
515
            }
516
            if (loop && trackpos >= track_length)
517
                trackpos -= track_length;
518
        }
519
        else if (!loop && song_done && lose_con == 0)
520
        {
521
            if (song_id == 4)
522
                trackpos += ((delta_time / 1000000) * pitch);
523
            else
524
                trackpos += ((delta_time / 1000000) * pitch);
525
            if (trackpos > (track_length + (meter * 4)))
526
                trackpos -= (meter * 2);
527
        }
528
        else if (!tenna_boss && _truetrackpos == 0 && _truetrackpos < trackpos && trackpos > (track_length - 4))
529
        {
530
            trackpos = track_length;
531
        }
532
        else if (rewind)
533
        {
534
            trackpos = lerp(rewind_start, 0, rewind_timer / 30);
535
            rewind_timer++;
536
        }
537
        else
538
        {
539
            trackpos = _truetrackpos;
540
        }
541
    }
542
    if (song_id == 4)
543
    {
544
        pitch = remap_clamped(12, 15.25, 1, 0.1, trackpos);
545
        audio_sound_pitch(track1_main, pitch);
546
        audio_sound_pitch(track2_main, pitch);
547
    }
548
    if (reloading)
549
    {
550
        audio_sound_set_track_position(track1_instance, remtrackpos[0]);
551
        audio_sound_set_track_position(track2_instance, remtrackpos[0]);
552
        if (song_id == 0)
553
        {
554
            audio_sound_set_track_position(track1_solo_instance, remtrackpos[0]);
555
            audio_sound_set_track_position(track2_solo_instance, remtrackpos[0]);
556
        }
557
        reloading = false;
558
    }
559
    if (pitch != 1 && lose_con == 0 && song_id != 4)
560
    {
561
        debug_print("restoring pitch");
562
        pitch = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(pitch, 1, 0.025);
563
        audio_sound_pitch(track1_main, pitch);
564
        audio_sound_pitch(track2_main, pitch);
565
        if (song_id == 0)
566
        {
567
            audio_sound_pitch(track1_solo_instance, pitch);
568
            audio_sound_pitch(track2_solo_instance, pitch);
569
        }
570
    }
571
    if (song_id != 0)
572
    {
573
    }
574
    else if (solo_con == 0 && trackpos >= (timestamp[0] - 2))
575
    {
576
        if (solo_difficulty < 0)
577
        {
578
            if (fame >= 10000)
579
                solo_difficulty = 2;
580
            else if (fame >= 6000)
581
                solo_difficulty = 1;
582
            else
583
                solo_difficulty = 0;
584
            if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
585
            {
586
                if (solo_difficulty == 0)
587
                    
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("solo will be easy (" + string(fame) + "/5000 pts)");
588
                if (solo_difficulty == 1)
589
                    
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("solo will be medium (" + string(fame) + "/5000 pts)");
590
                if (solo_difficulty == 2)
591
                    
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("solo will be hard (" + string(fame) + "/10000 pts)");
592
            }
593
        }
594
        scr_rhythmgame_notechart_lead_solo(solo_difficulty);
595
        scr_rhythmgame_notechart_lead_finale();
596
        var _track_offset = timestamp[solo_difficulty] - (timestamp[0] - trackpos);
597
        if (solo_difficulty == 0)
598
            _track_offset = trackpos;
599
        if (!safety_mode || smooth_timer > 0)
600
        {
601
            audio_sound_set_track_position(track1_solo_instance, _track_offset);
602
            audio_sound_set_track_position(track2_solo_instance, _track_offset);
603
        }
604
        solo_con = 1;
605
    }
606
    else if (solo_con == 1 && trackpos >= timestamp[0])
607
    {
608
        debug_print("leapt to solo");
609
        if (solo_difficulty != 0)
610
        {
611
            if (safety_mode)
612
            {
613
                trackpos += (timestamp[solo_difficulty] - timestamp[0]);
614
            }
615
            else
616
            {
617
                trackpos = audio_sound_get_track_position(track1_solo_instance);
618
                audio_sound_set_track_position(track1_instance, trackpos);
619
                audio_sound_set_track_position(track2_instance, trackpos);
620
            }
621
        }
622
        mus_volume(track1_solo_instance, 0, 0);
623
        mus_volume(track2_solo_instance, main_vol, 0);
624
        mus_volume(track1_instance, 0, 0);
625
        mus_volume(track2_instance, 0, 0);
626
        track1_main = track1_solo_instance;
627
        track2_main = track2_solo_instance;
628
        solo_con = 2;
629
    }
630
    else if (solo_con == 2 && trackpos >= (timestamp[solo_difficulty + 1] - 2))
631
    {
632
        debug_print("preparing post-solo");
633
        var _track_offset = timestamp[3] - (timestamp[solo_difficulty + 1] - trackpos);
634
        if (!safety_mode || smooth_timer > 0)
635
        {
636
            audio_sound_set_track_position(track1_instance, _track_offset);
637
            audio_sound_set_track_position(track2_instance, _track_offset);
638
        }
639
        solo_con = 3;
640
    }
641
    else if (solo_con == 3 && trackpos >= timestamp[solo_difficulty + 1])
642
    {
643
        debug_print("solo done");
644
        if (safety_mode)
645
        {
646
            if (solo_difficulty < 3)
647
                trackpos += (timestamp[3] - timestamp[solo_difficulty + 1]);
648
        }
649
        else
650
        {
651
            trackpos = audio_sound_get_track_position(track1_instance);
652
        }
653
        mus_volume(track1_solo_instance, 0, 0);
654
        mus_volume(track2_solo_instance, 0, 0);
655
        mus_volume(track1_instance, 0, 0);
656
        mus_volume(track2_instance, main_vol, 0);
657
        track1_main = track1_instance;
658
        track2_main = track2_instance;
659
        solo_con = 4;
660
    }
661
    var timeunit = trackpos - remtrackpos[0];
662
    var averagetimeunit = ((trackpos - remtrackpos[0]) + (remtrackpos[0] - remtrackpos[1]) + (remtrackpos[1] - remtrackpos[2])) / 3;
663
    remtrackpos[4] = remtrackpos[3];
664
    remtrackpos[3] = remtrackpos[2];
665
    remtrackpos[2] = remtrackpos[1];
666
    remtrackpos[1] = remtrackpos[0];
667
    remtrackpos[0] = trackpos;
668
    var notecheckmax = -1;
669
    var notecheck = minnote;
670
    var foundnotes = 0;
671
    var _notetime = 0;
672
    while (notecheck < maxnote)
673
    {
674
        notecheckmax++;
675
        _notetime = notetime[notecheck] - trackpos;
676
        if (hardmode)
677
        {
678
            if (_notetime >= -0.2 && _notetime <= 0.12)
679
            {
680
                foundnotes = 1;
681
                targetnote[notecheckmax] = notecheck;
682
                notecheck++;
683
            }
684
            else
685
            {
686
                notecheckmax--;
687
                break;
688
            }
689
        }
690
        else if (abs(_notetime) <= 0.12)
691
        {
692
            foundnotes = 1;
693
            targetnote[notecheckmax] = notecheck;
694
            notecheck++;
695
        }
696
        else if (auto_play == 1 && _notetime < 0)
697
        {
698
            foundnotes = 1;
699
            targetnote[notecheckmax] = notecheck;
700
            notecheck++;
701
        }
702
        else
703
        {
704
            notecheckmax--;
705
            break;
706
        }
707
    }
708
    pressedtimer[0]++;
709
    pressedtimer[1]++;
710
    buffer[0]--;
711
    buffer[1]--;
712
    hold_score = 0;
713
    for (i = 0; i < 2; i++)
714
    {
715
        var checkpress, holdpress;
716
        if (i == 0)
717
        {
718
            checkpress = buttonb_p() || left_p();
719
            holdpress = buttonb_h() || left_h();
720
        }
721
        if (i == 1)
722
        {
723
            checkpress = buttonr_p() || right_p();
724
            holdpress = buttonr_h() || right_h();
725
        }
726
        if (auto_play != 0 || lose_con == 2)
727
        {
728
            checkpress = false;
729
            holdpress = false;
730
        }
731
        if (auto_play == 1)
732
        {
733
            if (hold_end[i] > 0 && trackpos < hold_end[i])
734
            {
735
                holdpress = true;
736
            }
737
            else
738
            {
739
                for (var notei = 0; notei <= notecheckmax; notei++)
740
                {
741
                    var _leniency = 0.1;
742
                    if (notetype[targetnote[notei]] == i && notealive[targetnote[notei]] == 1 && notetime[targetnote[notei]] <= (trackpos + (averagetimeunit * _leniency)))
743
                    {
744
                        checkpress = true;
745
                        holdpress = true;
746
                        break;
747
                    }
748
                }
749
            }
750
        }
751
        if (checkpress)
752
        {
753
            with (performer)
754
            {
755
                if (other.i == 0)
756
                    sprite_index = spr_kris_guitar;
757
                else
758
                    sprite_index = spr_kris_guitar_high;
759
                event_user(0);
760
            }
761
        }
762
        if (hold_end[i] > 0)
763
        {
764
            if (hold_end[i] < trackpos || !holdpress)
765
            {
766
                var _holdpos = trackpos;
767
                if (trackpos >= (hold_end[i] - (averagetimeunit * 3)))
768
                    _holdpos = max(hold_end[i], _holdpos);
769
                var chainPoints = floor(((min(hold_end[i], _holdpos) - hold_start[i]) / meter) * 4) * 10;
770
                if (_holdpos >= hold_end[i])
771
                {
772
                    score_scale = 4;
773
                    chainPoints *= 2;
774
                    note_hit_timer[i] = 4;
775
                    if (tenna_boss)
776
                    {
777
                        var _holdlength = (hold_end[i] - hold_start[i]) / (meter / 2);
778
                        scr_tenna_add_score(ceil(_holdlength / 2));
779
                    }
780
                }
781
                else
782
                {
783
                    if (oneAtATime)
784
                        mus_volume(track1_main, main_vol, 0);
785
                    mus_volume(track2_main, 0, 0);
786
                    notescore[heldnote[i]] = hold_start[i] - trackpos;
787
                    if (tenna_boss)
788
                    {
789
                        var _holdlength = (trackpos - hold_start[i]) / meter;
790
                        scr_tenna_add_score(round(_holdlength / 2));
791
                    }
792
                }
793
                heldnote[i] = 0;
794
                total_score += chainPoints;
795
                if (tutorial == 0)
796
                {
797
                    fame += (chainPoints * fame_mul);
798
                    total_fame += (chainPoints * fame_mul);
799
                }
800
                points += chainPoints;
801
                max_combo = max(combo, max_combo);
802
                if (heldnote[1 - i] != 0 && abs(hold_end[i] - hold_start[1 - i]) > 0.1 && !abs(hold_start[i] - hold_start[1 - i]) < 0.1)
803
                {
804
                    with (performer)
805
                    {
806
                        if (sprite_index == spr_kris_guitar_high)
807
                        {
808
                            if (other.i == 1)
809
                                sprite_index = spr_kris_guitar;
810
                            else
811
                                sprite_index = spr_kris_guitar_high_hold;
812
                        }
813
                        else
814
                        {
815
                            sprite_index = spr_kris_guitar_high;
816
                        }
817
                    }
818
                }
819
                hold_end[i] = 0;
820
            }
821
            else if (trackpos >= hold_start[i])
822
            {
823
                performer.image_index = 0;
824
                hold_score += floor(((trackpos - hold_start[i]) / meter) * 40);
825
                if (score_scale < 2.5)
826
                    score_scale += 0.4;
827
                if (note_hit_timer[i] <= 1)
828
                    note_hit_timer[i] = 3;
829
            }
830
        }
831
        if (checkpress && buffer[i] <= 0)
832
        {
833
            note_hit_timer[i] = 5;
834
            note_hit_score[i] = 0;
835
            pressedtimer[i] = 0;
836
            buffer[i] = 2;
837
        }
838
        if (lyrics_index < lyric_count && trackpos > lyric_time[lyrics_index])
839
        {
840
            current_lyric = lyrics[lyrics_index];
841
            censored_lyric = censored_lyrics[lyrics_index];
842
            lyrics_index++;
843
            update_lyrics = true;
844
        }
845
        var _firstnote = true;
846
        var _earlypunish = false;
847
        var _press_buffer = hardmode ? 0 : (room_speed / 10);
848
        if (pressedtimer[i] <= _press_buffer && foundnotes == 1)
849
        {
850
            bonus = (hardmode && fame >= 12000) ? 10 : 0;
851
            for (var notei = 0; notei <= notecheckmax; notei++)
852
            {
853
                if (notetype[targetnote[notei]] == i && notealive[targetnote[notei]] == 1)
854
                {
855
                    var _leniency = 1.6;
856
                    var _famegain = 0;
857
                    var _noteaccuracy = notetime[targetnote[notei]] - trackpos;
858
                    if (abs(_noteaccuracy) < (averagetimeunit * _leniency))
859
                    {
860
                        notescore[targetnote[notei]] = 100 + bonus;
861
                        _famegain = 100;
862
                        great++;
863
                        if (tenna_boss)
864
                        {
865
                            score_var++;
866
                            if (score_var == 1)
867
                                scr_tenna_add_score(2);
868
                            if (score_var == 2)
869
                                scr_tenna_add_score(1);
870
                            if (score_var == 3)
871
                                scr_tenna_add_score(1);
872
                            if (score_var == 4)
873
                                scr_tenna_add_score(1);
874
                            if (score_var == 4)
875
                                score_var = 0;
876
                        }
877
                    }
878
                    else if (!hardmode || abs(_noteaccuracy) < (averagetimeunit * 2.4))
879
                    {
880
                        notescore[targetnote[notei]] = 50 + bonus;
881
                        if (fame < 5950)
882
                            _famegain = 60;
883
                        else
884
                            _famegain = 50;
885
                        good++;
886
                        if (tenna_boss)
887
                            scr_tenna_add_score(1);
888
                    }
889
                    else if (hardmode && _firstnote && pressedtimer[i] == 0)
890
                    {
891
                        if (trackpos < notetime[targetnote[notei]])
892
                        {
893
                            debug_print("early miss");
894
                            if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
() && notei > 0 && notetype[targetnote[notei - 1]] == i && notealive[targetnote[notei - 1]] == 1)
895
                                debug_print("PREVIOUS NOTE STILL ALIVE DESPITE EARLY MISS");
896
                            notescore[targetnote[notei]] = 0;
897
                            notealive[targetnote[notei]] = 0;
898
                            missnotecon = 1;
899
                            miss++;
900
                            snd_play(miss_sound[irandom(1)]);
901
                        }
902
                        else
903
                        {
904
                            continue;
905
                        }
906
                    }
907
                    else
908
                    {
909
                        break;
910
                    }
911
                    total_score += notescore[targetnote[notei]];
912
                    if (missnotecon == 1)
913
                        last_note_score = -2;
914
                    else
915
                        last_note_score = notescore[targetnote[notei]];
916
                    if (tutorial == 0)
917
                    {
918
                        fame += (_famegain * fame_mul);
919
                        total_fame += (_famegain * fame_mul);
920
                    }
921
                    points += notescore[targetnote[notei]];
922
                    score_scale = min(4, score_scale + (notescore[targetnote[notei]] / 100));
923
                    if (noteanim[targetnote[notei]] > 0)
924
                    {
925
                        if (i == 1)
926
                            performer.sprite_index = spr_kris_guitar_high_hold;
927
                    }
928
                    if (notescore[targetnote[notei]] >= 40 && noteend[targetnote[notei]] > 0)
929
                    {
930
                        hold_start[i] = notetime[targetnote[notei]];
931
                        hold_end[i] = noteend[targetnote[notei]];
932
                        heldnote[i] = targetnote[notei];
933
                    }
934
                    if (notescore[targetnote[notei]] >= 40)
935
                    {
936
                        combo++;
937
                        max_combo = max(combo, max_combo);
938
                    }
939
                    notealive[targetnote[notei]] = 0;
940
                    note_hit_score[i] = notescore[targetnote[notei]];
941
                    pressedtimer[i] = (room_speed / 10) + 1;
942
                    if (oneAtATime)
943
                        mus_volume(track1_main, 0, 0);
944
                    if (trackpos >= 0)
945
                        mus_volume(track2_main, main_vol, 0);
946
                    _firstnote = false;
947
                    break;
948
                }
949
            }
950
        }
951
        else if (pressedtimer[i] == 0 && missnotecon != 1 && !game_won && (hardmode || _notetime == 0 || _notetime > ((_press_buffer / 30) + 0.12)))
952
        {
953
            snd_play(guitar_sound[irandom(1) + (i * 2)]);
954
        }
955
    }
956
    fame = clamp(fame, 0, max_fame);
957
    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
958
    {
959
        if (song_initialized && !song_done && loadsong == 3)
960
        {
961
            var _skip = false;
962
            if (keyboard_check_pressed(vk_f5))
963
            {
964
                _skip = true;
965
                fame = 999999;
966
            }
967
            if (keyboard_check_pressed(vk_f6))
968
            {
969
                fame = 0;
970
                if (lose_con == 0)
971
                    lose_con = 1;
972
            }
973
            if (_skip)
974
            {
975
                total_fame = fame;
976
                trackpos = track_length;
977
                audio_stop_all();
978
                scr_rhythmgame_notechart_clear();
979
                performer.sprite_index = spr_kris_rock_2;
980
                with (drums)
981
                {
982
                    performer.sprite_index = spr_susie_drum;
983
                    scr_rhythmgame_notechart_clear();
984
                    con = -1;
985
                    fade = 1;
986
                }
987
                with (vocals)
988
                {
989
                    performer.sprite_index = spr_ralsei_rock_1;
990
                    scr_rhythmgame_notechart_clear();
991
                    scr_rhythmgame_clear_all_lyrics();
992
                }
993
            }
994
        }
995
    }
996
    with (obj_minigame_quit_ui)
997
    {
998
    }
999
    if ((replayversion || song_id == 0) && !song_done && (loadsong == 3 || loadsong == 2) && lose_con == 1)
1000
    {
1001
        if (replayversion)
1002
            replayquit = 1;
1003
        
scr_debug_print_persistent
scr_debug_print_persistent

function
scr_debug_print_persistent(arg0, arg1)
{ } function debug_print_persistent(arg0, arg1) { } function scr_debug_delete_persistent(arg0, arg1 = false) { } function scr_debug_clear_persistent() { }
("losing", "losing pitch at " + string(fade));
1004
        if (replayversion)
1005
        {
1006
            with (obj_minigame_quit_ui)
1007
            {
1008
                if (canceltimer < canceltime)
1009
                    canceltimer = canceltime;
1010
            }
1011
        }
1012
        pitch = fade;
1013
        sound_pitch(track1_instance, fade);
1014
        sound_pitch(track2_instance, fade);
1015
        if (song_id == 0)
1016
        {
1017
            sound_pitch(track1_solo_instance, fade);
1018
            sound_pitch(track2_solo_instance, fade);
1019
        }
1020
        if (fade <= 0.5 && !replayquit)
1021
        {
1022
            with (vocals)
1023
            {
1024
                performer.sprite_index = spr_ralsei_rock_surprise;
1025
                performer.image_index = 1;
1026
                performer.image_speed = 0;
1027
            }
1028
        }
1029
        if (fade == 0)
1030
        {
1031
            sound_pause(track1_instance);
1032
            sound_pause(track2_instance);
1033
            if (song_id == 0)
1034
            {
1035
                sound_pause(track1_solo_instance);
1036
                sound_pause(track2_solo_instance);
1037
            }
1038
            with (drums)
1039
            {
1040
            }
1041
            with (vocals)
1042
            {
1043
            }
1044
            lose_con = 2;
1045
            rewind_start = trackpos;
1046
        }
1047
    }
1048
    if (tenna_boss && !song_done && (looptimer + trackpos) >= chart_end)
1049
    {
1050
        song_done = true;
1051
        debug_print("chart done!");
1052
        mus_volume(track1_instance, 1, 30);
1053
        mus_volume(track2_instance, 0, 30);
1054
    }
1055
    if (!rewind && loop && trackpos < remtrackpos[4] && trackpos < 2)
1056
    {
1057
        if (maxnote >= 5)
1058
            last_score[0] = notescore[maxnote - 5];
1059
        if (maxnote >= 4)
1060
            last_score[1] = notescore[maxnote - 4];
1061
        if (maxnote >= 3)
1062
            last_score[2] = notescore[maxnote - 3];
1063
        if (maxnote >= 2)
1064
            last_score[3] = notescore[maxnote - 2];
1065
        if (maxnote >= 1)
1066
            last_score[4] = notescore[maxnote - 1];
1067
        debug_print("song looped");
1068
        minnote = 0;
1069
        remtrackpos[4] = -1;
1070
        remtrackpos[3] -= track_length;
1071
        remtrackpos[2] -= track_length;
1072
        remtrackpos[1] -= track_length;
1073
        remtrackpos[0] -= track_length;
1074
        looptimer = track_length;
1075
        if (tutorial != 1)
1076
        {
1077
            var _notealive = (tutorial < 5) ? 1 : 0;
1078
            for (i = 0; i < maxnote; i++)
1079
            {
1080
                if (loop_start > 0)
1081
                {
1082
                    if (notetime[i] < loop_start)
1083
                        continue;
1084
                    else
1085
                        loop_start = 0;
1086
                }
1087
                notealive[i] = _notealive;
1088
                notescore[i] = 0;
1089
            }
1090
        }
1091
        with (obj_rhythmgame_chart)
1092
            event_user(0);
1093
    }
1094
    else if (!song_done && (trackpos >= track_length || lose_con == 2))
1095
    {
1096
        if ((song_id == 0 && !freeplay) || replayversion == true)
1097
            global.flag[1118 last_minigame_points] = points;
1098
        if (fame > 0 && lose_con == 0)
1099
        {
1100
            game_won = true;
1101
            debug_print("YOU WON!!");
1102
            savemiss = miss;
1103
            savegreat = great;
1104
            saveokay = okay;
1105
            savegood = good;
1106
            savehurt = hurt_counter;
1107
            
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; }
(snd_free_all, 30);
1108
            instance_create(0, 100, obj_minigame_evaluation);
1109
        }
1110
        else
1111
        {
1112
            debug_print("YOU DIDN'T WIN!!");
1113
        }
1114
        song_done = true;
1115
        if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
1116
            fastforward = false;
1117
    }
1118
}
1119
with (obj_rhythmgame_chart)
1120
    trackpos = other.trackpos;