Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_rhythmgame_editor_Create_0

(view raw script w/o annotations or w/e)
1
for (i = 0; i < 5; i++)
2
    remtrackpos[i] = 0;
3
global.interact = 1;
4
song_initialized = 0;
5
loadsong = 1;
6
image_speed = 0;
7
missnotetimer = 0;
8
missnotecon = 0;
9
minnote = 0;
10
trackpos = 0;
11
scenecon = 0;
12
maxnote = 0;
13
buffer[0] = 0;
14
buffer[1] = 0;
15
buffer[2] = 0;
16
pressedtimer[0] = 10;
17
pressedtimer[1] = 10;
18
pressedtimer[2] = 10;
19
bpm = 230;
20
notespacing = 60 / bpm;
21
meter = notespacing * 4;
22
startoffset = 0;
23
oneAtATime = true;
24
hold_start[0] = 0;
25
hold_end[0] = 0;
26
hold_start[1] = 0;
27
hold_end[1] = 0;
28
hold_start[2] = 0;
29
hold_end[2] = 0;
30
heldnote[0] = 0;
31
heldnote[1] = 0;
32
heldnote[2] = 0;
33
hold_score = 0;
34
total_score = 0;
35
score_scale = 2;
36
combo = 5000;
37
max_score = 25000;
38
auto_play = true;
39
invc = 0;
40
hurt_flash = 0;
41
goodScore = 0;
42
maxScore = 0;
43
track1 = -1;
44
track2 = -1;
45
track1_instance = -1;
46
track2_instance = -1;
47
instrument = 0;
48
note_color[0] = c_teal;
49
note_color[1] = #00A2E8;
50
note_color[2] = c_orange;
51
note_hit_timer[0] = 0;
52
note_hit_timer[1] = 0;
53
note_hit_timer[2] = 0;
54
note_hit_score[0] = 40;
55
note_hit_score[1] = 40;
56
song_loaded = false;
57
song_id = 0;
58
savestring = "music_timing";
59
brightness = 1;
60
trackstart = 0;
61
chart_end = 0;
62
camx = camerax();
63
camy = cameray();
64
song_menu = true;
65
start_buffer = true;
66
selection = 0;
67
tracklist = scr_rhythmgame_songlist();
68
for (var _i = 0; _i < array_length(tracklist); _i++)
69
    tracklist[_i] = string_format_zero(_i, 2, 0) + " - " + tracklist[_i];
70
savecon = 0;
71
track_length = 135.652;
72
notespeed = 150;
73
has_file = false;
74
load_source = 0;
75
rec_time[0] = 0;
76
rec_endtime[0] = 0;
77
rec_type[0] = 0;
78
rec_hold = 0;
79
rec_count = 0;
80
rec_max = 25;
81
recording_mode = false;
82
paused = false;
83
mousecon = 0;
84
loop = false;
85
tooltips = true;
86
changesmade = false;
87
erase_min = 0;
88
erase_max = 1;
89
do_refresh = false;
90
undo_action[0] = 0;
91
undo_index[0] = -1;
92
undo_time[0] = -1;
93
undo_type[0] = -1;
94
undo_end[0] = -1;
95
undo_anim[0] = -1;
96
undo_queue = 0;
97
undo_cap = 0;
98
clip_size = 0;
99
clip_time[0] = 0;
100
clip_type[0] = 0;
101
clip_end[0] = 0;
102
clip_anim[0] = 0;
103
notemod_index = -1;
104
scrollcon = 0;
105
rem_mode = false;
106
rem_pos = 0;
107
scroll_init = 0;
108
noteeditmode = 0;
109
quickscroll_timer = 0;
110
arrow_scroll = 0;
111
ralsei = instance_create(420, 300, obj_rhythmgame_performer);
112
ralsei.sprite_index = spr_ralsei_sing_clap;
113
ralsei.image_xscale = 2;
114
ralsei.image_yscale = 2;
115
ralsei.image_speed = 0;
116
ralsei.depth = depth - 10;
117
ralsei.loop = true;
118
ralsei.animspeed = 0.5;
119
ralsei.rhythmer = id;
120
susie = instance_create(120, 300, obj_rhythmgame_performer);
121
susie.sprite_index = spr_susie_drum_play;
122
susie.image_xscale = 2;
123
susie.image_yscale = 2;
124
susie.image_speed = 0.16666666666666666;
125
susie.depth = depth - 10;
126
susie.loop = true;
127
susie.animspeed = 3;
128
susie.rhythmer = id;
129
kris = instance_create(220, 300, obj_rhythmgame_performer);
130
kris.sprite_index = spr_kris_rock_1;
131
kris.image_xscale = 2;
132
kris.image_yscale = 2;
133
kris.image_speed = 0.16666666666666666;
134
kris.depth = depth - 10;
135
kris.loop = false;
136
kris.rhythmer = id;
137
last_note = 0;
138
current_note = 1;
139
cooldown = 0;
140
note_streak = 0;
141
original_notespeed = notespeed;
142
143
function load_chart()
144
{
145
    debug_print("track loading...");
146
    savestring = "music_timing";
147
    if (song_id == 1)
148
    {
149
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loading practice song");
150
        savestring += "_practice";
151
    }
152
    else if (song_id == 2)
153
    {
154
        song_id = 2;
155
        savestring += "_tenna";
156
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loading tenna_battle");
157
        bpm = 148;
158
    }
159
    else if (song_id == 3)
160
    {
161
        song_id = 3;
162
        savestring += "_tutorial";
163
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loading tutorial song");
164
        bpm = 190;
165
    }
166
    else if (song_id == 4)
167
    {
168
        song_id = 4;
169
        savestring += "_board4";
170
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loading board4_rhythm");
171
        bpm = 120;
172
    }
173
    else if (song_id == 5)
174
    {
175
        song_id = 5;
176
        savestring += "_rudebuster_boss";
177
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loading rudebuster_boss");
178
        bpm = 140;
179
    }
180
    else if (song_id == 6)
181
    {
182
        song_id = 6;
183
        savestring += "_vapor";
184
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loading battle_vapor");
185
        bpm = 200;
186
    }
187
    else if (song_id == 8)
188
    {
189
        savestring += "_rudebuster";
190
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loading rudebuster");
191
    }
192
    else if (song_id == 9)
193
    {
194
        savestring += "_fieldofhopes";
195
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loading field of hopes and dreams");
196
    }
197
    else if (song_id == 10)
198
    {
199
        savestring += "_knockyoudown";
200
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loading Knock You Down!!");
201
    }
202
    else
203
    {
204
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loading rock video");
205
    }
206
    if (instrument == 1)
207
    {
208
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loaded drums");
209
        note_color[0] = #D1176A;
210
        note_color[1] = #EA79C8;
211
        savestring += "_drums";
212
    }
213
    else if (instrument == 2)
214
    {
215
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loaded vocals");
216
        note_color[0] = c_green;
217
        note_color[1] = #B5E61D;
218
        note_color[2] = c_lime;
219
        savestring += "_vocals";
220
    }
221
    else
222
    {
223
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("loaded lead");
224
    }
225
    scr_rhythmgame_load_song(song_id, false, false, true);
226
    if (file_exists(savestring + ".txt"))
227
    {
228
        scr_rhythmgame_editor_load(savestring + ".txt");
229
        has_file = true;
230
        load_source = 1;
231
    }
232
    else
233
    {
234
        if (instrument == 0)
235
        {
236
            scr_rhythmgame_notechart_lead(song_id);
237
            if (song_id == 0)
238
            {
239
                scr_rhythmgame_notechart_lead_solo(0);
240
                scr_rhythmgame_notechart_lead_solo(1);
241
                scr_rhythmgame_notechart_lead_solo(2);
242
                scr_rhythmgame_notechart_lead_finale();
243
            }
244
        }
245
        else if (instrument == 1)
246
        {
247
            scr_rhythmgame_notechart_drums(song_id);
248
        }
249
        else if (instrument == 2)
250
        {
251
            scr_rhythmgame_notechart_vocals(song_id);
252
        }
253
        load_source = 2;
254
    }
255
}