Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dw_church_organ_Create_0

related scripts: Create_0 Draw_0Other_10Step_0

(view raw script w/o annotations or w/e)
1
siner = 0;
2
var loc = findspriteinfo(spr_debug_cameraregionpreview, "PianoMarkers");
3
notes = instance_create(loc.x, loc.y, obj_dw_church_organ_notes);
4
notes.depth = 500;
5
myint[0] = instance_create(x, y, obj_trigger_interact);
6
var ints = findspriteinfo_all(7188, "ASSETS", 3355443);
7
for (var i = 0; i < array_length(ints); i++)
8
{
9
    myint[i].x = ints[i].x;
10
    myint[i].y = ints[i].y;
11
    
scr_sizeexact
scr_sizeexact

function
scr_sizeexact(arg0, arg1, arg2 = id)
{ with (arg2) { if (!sprite_exists(sprite_index)) { debug_message("Can't size, no sprite"); exit; } var _w = sprite_get_width(sprite_index); var _h = sprite_get_width(sprite_index); image_xscale = arg0 / _w; image_yscale = arg1 / _h; } }
(ints[i].sprite_width, ints[i].sprite_height, myint[i]);
12
}
13
notesloc = findspriteinfo(spr_dw_castle_church_pianoui_arrow, "PianoMarkers", #FFF656);
14
engaged = false;
15
con = 0;
16
customcon = 0;
17
buffer = 0;
18
soundtoplay = 0;
19
baselight = 0.25;
20
arrowsalpha = baselight;
21
playindex = -1;
22
timer = 0;
23
solved = 0;
24
endtimer = 0;
25
endtime = 15;
26
makenote = false;
27
masteralpha = 0;
28
set_party = false;
29
kris_play = false;
30
if (!instance_exists(obj_tutorial_text))
31
    instance_create(x, y, obj_tutorial_text);
32
solved = 1;
33
depth = 900700;
34
endlessplaylog = "";
35
kris = 
36
{
37
    inst: stringsetloc(
Piano
"Piano", "obj_dw_church_organ_slash_Create_0_gml_55_0"
),
38
    snd: 156,
39
    spr: 660,
40
    unlocked: true
41
};
42
susie = 
43
{
44
    inst: stringsetloc(
Rock Guitar
"Rock Guitar", "obj_dw_church_organ_slash_Create_0_gml_56_0"
),
45
    snd: 157,
46
    spr: 6860,
47
    unlocked: true
48
};
49
ralsei = 
50
{
51
    inst: stringsetloc(
Choir
"Choir", "obj_dw_church_organ_slash_Create_0_gml_57_0"
),
52
    snd: 127,
53
    spr: 1751,
54
    unlocked: true
55
};
56
noelle = 
57
{
58
    inst: stringsetloc(
Music Box
"Music Box", "obj_dw_church_organ_slash_Create_0_gml_58_0"
),
59
    snd: 229,
60
    spr: 3628,
61
    unlocked: true
62
};
63
diamond = 
64
{
65
    inst: stringsetloc(
Violin
"Violin", "obj_dw_church_organ_slash_Create_0_gml_59_0"
),
66
    snd: 706,
67
    spr: 5474,
68
    unlocked: true
69
};
70
heart = 
71
{
72
    inst: stringsetloc(
Bass
"Bass", "obj_dw_church_organ_slash_Create_0_gml_60_0"
),
73
    snd: 748,
74
    spr: 3396,
75
    unlocked: true
76
};
77
clover = 
78
{
79
    inst: stringsetloc(
Acoustic Guitar
"Acoustic Guitar", "obj_dw_church_organ_slash_Create_0_gml_61_0"
),
80
    snd: 206,
81
    spr: 8246,
82
    unlocked: true
83
};
84
rabbit = 
85
{
86
    inst: stringsetloc(
Sine Whistle
"Sine Whistle", "obj_dw_church_organ_slash_Create_0_gml_62_0"
),
87
    snd: 700,
88
    spr: 209,
89
    unlocked: true
90
};
91
spade = 
92
{
93
    inst: stringsetloc(
Splat
"Splat", "obj_dw_church_organ_slash_Create_0_gml_63_0"
),
94
    snd: 289,
95
    spr: 2952,
96
    unlocked: true
97
};
98
pawn = 
99
{
100
    inst: stringsetloc(
Snare
"Snare", "obj_dw_church_organ_slash_Create_0_gml_65_0"
),
101
    snd: 721,
102
    spr: 6934,
103
    unlocked: true
104
};
105
boxingglove = 
106
{
107
    inst: stringsetloc(
Bass Drum
"Bass Drum", "obj_dw_church_organ_slash_Create_0_gml_66_0"
),
108
    snd: 8,
109
    spr: 8379,
110
    unlocked: true
111
};
112
puzzle = 
113
{
114
    inst: stringsetloc(
Hi Hat
"Hi Hat", "obj_dw_church_organ_slash_Create_0_gml_67_0"
),
115
    snd: 259,
116
    spr: 2000,
117
    unlocked: true
118
};
119
sweet = 
120
{
121
    inst: stringsetloc(
Square Wave
"Square Wave", "obj_dw_church_organ_slash_Create_0_gml_68_0"
),
122
    snd: 120,
123
    spr: 7613,
124
    unlocked: true
125
};
126
capn = 
127
{
128
    inst: stringsetloc(
Saw Wave
"Saw Wave", "obj_dw_church_organ_slash_Create_0_gml_69_0"
),
129
    snd: 65,
130
    spr: 6138,
131
    unlocked: true
132
};
133
k_k = 
134
{
135
    inst: stringsetloc(
Noise Wave
"Noise Wave", "obj_dw_church_organ_slash_Create_0_gml_70_0"
),
136
    snd: 133,
137
    spr: 5601,
138
    unlocked: true
139
};
140
whip = 
141
{
142
    inst: stringsetloc(
Tamborine
"Tamborine", "obj_dw_church_organ_slash_Create_0_gml_71_0"
),
143
    snd: 439,
144
    spr: 5740,
145
    unlocked: scr_enemyrecruitcheck("man")
146
};
147
cat = 
148
{
149
    inst: stringsetloc(
Synthetic Meow
"Synthetic Meow", "obj_dw_church_organ_slash_Create_0_gml_72_0"
),
150
    snd: 93,
151
    spr: 7766,
152
    unlocked: scr_enemyrecruitcheck("tas")
153
};
154
cheese = 
155
{
156
    inst: stringsetloc(
Bongo
"Bongo", "obj_dw_church_organ_slash_Create_0_gml_73_0"
),
157
    snd: 141,
158
    spr: 6131,
159
    unlocked: scr_enemyrecruitcheck("mau")
160
};
161
virus = 
162
{
163
    inst: stringsetloc(
Pulse Wave
"Pulse Wave", "obj_dw_church_organ_slash_Create_0_gml_74_0"
),
164
    snd: 652,
165
    spr: 4200,
166
    unlocked: scr_enemyrecruitcheck("vir")
167
};
168
ihealth = 
169
{
170
    inst: stringsetloc(
Triangle Wave
"Triangle Wave", "obj_dw_church_organ_slash_Create_0_gml_75_0"
),
171
    snd: 609,
172
    spr: 1902,
173
    unlocked: scr_enemyrecruitcheck("amb")
174
};
175
platter = 
176
{
177
    inst: stringsetloc(
Crash Cymbal
"Crash Cymbal", "obj_dw_church_organ_slash_Create_0_gml_76_0"
),
178
    snd: 625,
179
    spr: 7314,
180
    unlocked: scr_enemyrecruitcheck("swa")
181
};
182
plug = 
183
{
184
    inst: stringsetloc(
FM Bass
"FM Bass", "obj_dw_church_organ_slash_Create_0_gml_77_0"
),
185
    snd: 195,
186
    spr: 5540,
187
    unlocked: true
188
};
189
dolphin = 
190
{
191
    inst: stringsetloc(
Steel Drum
"Steel Drum", "obj_dw_church_organ_slash_Create_0_gml_78_0"
),
192
    snd: 264,
193
    spr: 1685,
194
    unlocked: scr_enemyrecruitcheck("pop")
195
};
196
var allinsts = [kris, susie, ralsei, noelle, diamond, heart, clover, rabbit, spade, pawn, boxingglove, puzzle, sweet, capn, k_k, whip, cat, cheese, virus, ihealth, platter, plug, dolphin];
197
selectors = [];
198
index = 0;
199
trueindex = 0;
200
for (var i = 0; i < array_length(allinsts); i++)
201
{
202
    allinsts[i].cut = false;
203
    if (allinsts[i].unlocked)
204
        array_push(selectors, allinsts[i]);
205
}
206
instcount = array_length(selectors);
207
mysnd = selectors[index].snd;
208
show_debug_message_concat(instcount);
209
210
getInd = function(arg0)
211
{
212
    return 
scr_wrap
scr_wrap

function
scr_wrap(arg0, arg1, arg2)
{ if ((arg0 % 1) == 0) { while (arg0 > arg2 || arg0 < arg1) { if (arg0 > arg2) { arg0 = (arg1 + arg0) - arg2 - 1; } else if (arg0 < arg1) { arg0 = ((arg2 + arg0) - arg1) + 1; } else { } } return arg0; } else { var _old = argument[0] + 1; while (arg0 != _old) { _old = arg0; if (arg0 < arg1) { arg0 = arg2 - (arg1 - arg0); } else if (arg0 > arg2) { arg0 = arg1 + (arg0 - arg2); } else { } } return arg0; } }
(arg0, 0, instcount - 1);
213
};
214
215
selint = [];
216
for (var i = 0; i < 5; i++)
217
{
218
    with (instance_create(notesloc.x + 34 + (50 * i), notesloc.y + 81, obj_trigger_interact))
219
    {
220
        
scr_sizeexact
scr_sizeexact

function
scr_sizeexact(arg0, arg1, arg2 = id)
{ with (arg2) { if (!sprite_exists(sprite_index)) { debug_message("Can't size, no sprite"); exit; } var _w = sprite_get_width(sprite_index); var _h = sprite_get_width(sprite_index); image_xscale = arg0 / _w; image_yscale = arg1 / _h; } }
(38, 8);
221
        array_push(other.selint, id);
222
    }
223
}
224
prev = -4;
225
prev = instance_create(notesloc.x + 5, notesloc.y + 74, obj_trigger_interact);
226
next = -4;
227
next = instance_create(notesloc.x + 285, notesloc.y + 74, obj_trigger_interact);
228
susie.cut = true;
229
ralsei.cut = true;
230
spade.cut = true;
231
sweet.cut = true;
232
plug.cut = true;