Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_date_controller_Create_0

(view raw script w/o annotations or w/e)
1
timer = 0;
2
con = 0;
3
finalattackcon = 0;
4
questioncount = 0;
5
questioncorrectcount = 0;
6
questiondowntime = 20;
7
if (obj_pink_enemy.datecount > 1)
8
    questiondowntime = 10;
9
if (obj_pink_enemy.datecount == 4)
10
    snd_volume(snd_pink_stretch_2_fixed, 0, 90);
11
rr = 0;
12
r = 0;
13
camx = camerax();
14
camy = cameray();
15
camwidth = camerawidth();
16
camheight = cameraheight();
17
date1question_number = -1;
18
date2question_number = -1;
19
question_count = 0;
20
date_text_char_number = 0;
21
date_text2_char_number = 0;
22
can_skip_timer = 0;
23
heartspeed = 30;
24
heartpathpos = 0;
25
heartpathposmax = 100;
26
c = 100;
27
pathselected = -1;
28
sideselected = -1;
29
onthispath = -1;
30
hearthealth = 3;
31
heartcount = 14;
32
heartstatus[heartcount] = 0;
33
date4darknessalpha = 0;
34
portraittextscale = 1;
35
drawn_box_x[20] = 0;
36
var ___r = 0;
37
repeat (20)
38
{
39
    drawn_box_y[___r] = cameray() + 285;
40
    ___r++;
41
}
42
drawn_box_text[0] = "test 0";
43
drawn_box_text[1] = "test 1";
44
drawn_box_text[2] = "test 2";
45
drawn_box_text[3] = "test 3";
46
drawn_box_text[4] = "test 4";
47
drawn_box_text[5] = "test 5";
48
drawn_box_text[6] = "test 6";
49
drawn_box_text[20] = "";
50
drawn_box_x_offset = 0;
51
draw_box_selected = 0;
52
draw_box_selected_real = 0;
53
draw_box_con = 0;
54
draw_box_timer = 0;
55
arrow_siner = 0;
56
portrait_change_timer = 14;
57
portrait_change_timer_max = 15;
58
boxcount = 4;
59
if (obj_pink_enemy.datecount > 1)
60
    boxcount = 3;
61
ghost_fade_con = 0;
62
ghost_fade_siner = 0;
63
rand_array[0] = 0;
64
rand_array[1] = 1;
65
rand_array[2] = 2;
66
rand_array[3] = 3;
67
portrait1_talkspeed = 0.16666666666666666;
68
portrait2_talkspeed = 0.16666666666666666;
69
r = 3;
70
if (obj_pink_enemy.datecount > 1)
71
    r = 2;
72
for (var i = 0; i < r; i += 1)
73
{
74
    j = irandom_range(i, r);
75
    temp = rand_array[i];
76
    rand_array[i] = rand_array[j];
77
    rand_array[j] = temp;
78
}
79
dateorder[0] = 0;
80
for (var i = 0; i < r; i += 1)
81
{
82
    j = irandom_range(i, r);
83
    temp = rand_array[i];
84
    rand_array[i] = rand_array[j];
85
    rand_array[j] = temp;
86
}
87
questiontext = "";
88
questiontext2 = "";
89
choicetext[rand_array[0]] = stringsetloc(
Yes
"Yes", "obj_date_controller_slash_Other_11_gml_29_0"
);
90
choicetext[rand_array[1]] = stringsetloc(
Yes
"Yes", "obj_date_controller_slash_Other_11_gml_29_0"
);
91
choicetext[rand_array[2]] = stringsetloc(
Yes
"Yes", "obj_date_controller_slash_Other_11_gml_29_0"
);
92
choicetext[rand_array[3]] = stringsetloc(
Yes
"Yes", "obj_date_controller_slash_Other_11_gml_29_0"
);
93
choicetext[4] = "";
94
choicetext[5] = "";
95
choicetext[6] = "";
96
choicetext[7] = "";
97
choicetext[8] = "";
98
choicetext[9] = "";
99
drawn_box_text[0] = choicetext[0];
100
drawn_box_text[1] = choicetext[1];
101
drawn_box_text[2] = choicetext[2];
102
drawn_box_text[3] = choicetext[3];
103
drawn_box_text[4] = choicetext[4];
104
drawn_box_text[5] = choicetext[5];
105
drawn_box_text[6] = choicetext[6];
106
drawn_box_text[7] = choicetext[7];
107
drawn_box_text[8] = choicetext[8];
108
drawn_box_text[9] = choicetext[9];
109
var _text_xscale = 3;
110
var _text_yscale = 3;
111
if (global.lang == "ja")
112
    _text_xscale = 1;
113
choicetextxscale[rand_array[0]] = _text_xscale;
114
choicetextxscale[rand_array[1]] = _text_xscale;
115
choicetextxscale[rand_array[2]] = _text_xscale;
116
choicetextxscale[rand_array[3]] = _text_xscale;
117
choicetextxscale[4] = _text_xscale;
118
choicetextxscale[5] = _text_xscale;
119
choicetextxscale[6] = _text_xscale;
120
choicetextxscale[7] = _text_xscale;
121
choicetextxscale[8] = _text_xscale;
122
choicetextxscale[9] = _text_xscale;
123
choicetextxscale[10] = _text_xscale;
124
choicetextxscale[11] = _text_xscale;
125
choicetextxscale[12] = _text_xscale;
126
choicetextxscale[13] = _text_xscale;
127
choicetextxscale[14] = _text_xscale;
128
choicetextyscale[rand_array[0]] = _text_xscale;
129
choicetextyscale[rand_array[1]] = _text_xscale;
130
choicetextyscale[rand_array[2]] = _text_xscale;
131
choicetextyscale[rand_array[3]] = _text_xscale;
132
choicetextyscale[4] = _text_xscale;
133
choicetextyscale[5] = _text_xscale;
134
choicetextyscale[6] = _text_xscale;
135
choicetextyscale[7] = _text_xscale;
136
choicetextyscale[8] = _text_xscale;
137
choicetextyscale[9] = _text_xscale;
138
choiceiscorrect[rand_array[0]] = 1;
139
choiceiscorrect[rand_array[1]] = 1;
140
choiceiscorrect[rand_array[2]] = 1;
141
choiceiscorrect[rand_array[3]] = 1;
142
choiceiscorrect[4] = 1;
143
choiceiscorrect[5] = 1;
144
choiceiscorrect[6] = 1;
145
choiceiscorrect[7] = 1;
146
choiceiscorrect[8] = 1;
147
choiceiscorrect[9] = 1;
148
choiceiscorrect[10] = 1;
149
choiceiscorrect[11] = 1;
150
choiceiscorrect[12] = 1;
151
choiceiscorrect[13] = 1;
152
choiceiscorrect[14] = 1;
153
show_intro_outro_surfaces = true;
154
intro_outro_surfaces_whiteness_alpha = 1;
155
choicepath0 = path_add();
156
path_set_closed(choicepath0, false);
157
path_add_point(choicepath0, camerax() + 315, cameray() + 360, 100);
158
path_add_point(choicepath0, camerax() + 315, cameray() + 340, 100);
159
path_add_point(choicepath0, camerax() + 270, cameray() + 325, 100);
160
drawnchoicepath0 = path_add();
161
path_set_closed(drawnchoicepath0, false);
162
path_add_point(drawnchoicepath0, camerax() + 315, cameray() + 360, 100);
163
path_add_point(drawnchoicepath0, camerax() + 315, cameray() + 340, 100);
164
path_add_point(drawnchoicepath0, camerax() + 290, cameray() + 325, 100);
165
choicepath1 = path_add();
166
path_set_closed(choicepath1, false);
167
path_add_point(choicepath1, camerax() + 315, cameray() + 360, 100);
168
path_add_point(choicepath1, camerax() + 155, cameray() + 360, 100);
169
drawnchoicepath1 = path_add();
170
path_set_closed(drawnchoicepath1, false);
171
path_add_point(drawnchoicepath1, camerax() + 315, cameray() + 360, 100);
172
path_add_point(drawnchoicepath1, camerax() + 167, cameray() + 360, 100);
173
choicepath2 = path_add();
174
path_set_closed(choicepath2, false);
175
path_add_point(choicepath2, camerax() + 315, cameray() + 360, 100);
176
path_add_point(choicepath2, camerax() + 315, cameray() + 380, 100);
177
path_add_point(choicepath2, camerax() + 350, cameray() + 390, 100);
178
drawnchoicepath2 = path_add();
179
path_set_closed(drawnchoicepath2, false);
180
path_add_point(drawnchoicepath2, camerax() + 315, cameray() + 360, 100);
181
path_add_point(drawnchoicepath2, camerax() + 315, cameray() + 380, 100);
182
path_add_point(drawnchoicepath2, camerax() + 340, cameray() + 390, 100);
183
choicepath3 = path_add();
184
path_set_closed(choicepath3, false);
185
path_add_point(choicepath3, camerax() + 315, cameray() + 360, 100);
186
path_add_point(choicepath3, camerax() + 470, cameray() + 360, 100);
187
drawnchoicepath3 = path_add();
188
path_set_closed(drawnchoicepath3, false);
189
path_add_point(drawnchoicepath3, camerax() + 315, cameray() + 360, 100);
190
path_add_point(drawnchoicepath3, camerax() + 455, cameray() + 360, 100);
191
choiceselected = -1;
192
datetimeleft = 240;
193
datetimeleftmax = datetimeleft;
194
stoptimer = true;
195
havent_moved_left_or_right = true;
196
sprite_set_offset(spr_pinkspeaker_shocked_origin_adjusted, 26, 10);
197
pinkportrait = 982;
198
pinkportrait2 = 7504;
199
if (obj_pink_enemy.datecount == 2)
200
    pinkportrait = 200;
201
if (obj_pink_enemy.datecount == 2)
202
    pinkportrait2 = 5428;
203
if (obj_pink_enemy.datecount == 3)
204
    pinkportrait = 1034;
205
if (obj_pink_enemy.datecount > 3)
206
{
207
    pinkportrait = 2588;
208
    pinkportrait2 = 7274;
209
}
210
sprite_set_offset(spr_pinkspeaker_date4_idle, 2, 0);
211
sprite_set_offset(spr_pinkspeaker_date4_questionright, 2, 0);
212
sprite_set_offset(spr_pinkghost_date4_1, 1, 0);
213
sprite_set_offset(spr_pinkghost_date4_2, 2, 0);
214
sprite_set_offset(spr_pinkghost_date4_3, -3, 0);
215
eyeshaft_x = 0;
216
eyeshaft_alpha = 0;
217
date3_success_con = 0;
218
date3_success_timer = 0;
219
difficulty_prev = 0;
220
eye_shaft_blend = 16777215;
221
changecolortimer = 0;
222
changecolorcon = 0;
223
changecolorcount = 0;
224
colortarget = 16777215;
225
colortarget2 = 16777215;
226
changecolorcon2 = 0;
227
changecolortimer2 = 0;
228
pinkportrait_x = 210;
229
portraitflash_timer = 0;
230
portrait2flash_timer = 0;
231
pinkportrait_y = 40;
232
pinkportrait2_x = 210;
233
pinkportrait2_y = 40;
234
portraitshakecon = 0;
235
portraitshakecon2 = 0;
236
portraitshaketimer = 0;
237
portraitshaketimer2 = 0;
238
portraitvisibility = true;
239
portrait2visibility = true;
240
idiottext_x = 0;
241
idiottext_y = 0;
242
idiottext2_x = 0;
243
idiottext2_y = 0;
244
idiot1 = -1;
245
idiot2 = -1;
246
if (i_ex(obj_pink_enemy))
247
{
248
    idiot1 = obj_pink_enemy.idiot1;
249
    idiot2 = obj_pink_enemy.idiot2;
250
}
251
pinkindex = 0;
252
pinkindex2 = 0;
253
tailindex = 0;
254
tailindex2 = 0;
255
sweatindex = 0;
256
sweatindex2 = 0;
257
sweatcon = 0;
258
sweatcon2 = 0;
259
sweattimer = 0;
260
sweattimer2 = 0;
261
portrait_xscale = 2;
262
portrait2_xscale = 2;
263
portraitscon = 0;
264
portraitstimer = 0;
265
talktimer = 0;
266
talktimer2 = 0;
267
heart_x = 319;
268
heart_y = 385;
269
lightestpurple = make_color_rgb(215, 156, 237);
270
lightpurple = make_color_rgb(181, 139, 214);
271
medpurple = make_color_rgb(181, 105, 214);
272
darkpurple = make_color_rgb(102, 86, 177);
273
darkestpurple = make_color_rgb(18, 19, 35);
274
lightpink = make_color_rgb(247, 91, 200);
275
medpink = make_color_rgb(230, 36, 123);
276
darkpink = make_color_rgb(200, 34, 141);
277
limegreen = make_color_rgb(181, 230, 29);
278
darkgreen = make_color_rgb(34, 177, 76);
279
darkred = make_color_rgb(136, 0, 21);
280
bgrectangle1color = lightpurple;
281
bgrectangle2color = medpurple;
282
dialogueboxcolor = darkpurple;
283
dialogueboxghostcolor = lightpurple;
284
choiceselectioncolor = darkestpurple;
285
bgrectangle1colorstart = bgrectangle1color;
286
bgrectangle2colorstart = bgrectangle2color;
287
dialogueboxcolorstart = dialogueboxcolor;
288
dialogueboxghostcolorstart = dialogueboxghostcolor;
289
choiceselectioncolorstart = choiceselectioncolor;
290
diamondbg_alpha_current = 0;
291
diamondbg_alpha = 0;
292
diamondbg_red_alpha = 0;
293
mode = 0;
294
fevermodequestioncount = 1;
295
fevermodequestionlength = 3;
296
questionstofevermode = 3;
297
date1rand = choose(1, 2, 3, 4);
298
date1randdir = choose(-1, 1);
299
boxalphacon = 0;
300
boxalpha = 1;
301
minigame_won = false;
302
minigame_con = 0;
303
minigame_won_alpha = 0;
304
date3darkner_alpha = 0;
305
date3darkner_con = 0;
306
date3darkner_timer = 0;
307
snd_loop(snd_rumble);
308
if (obj_pink_enemy.datecount == 3)
309
    heart = instance_create(heart_x, heart_y - 1, obj_date_heart);
310
else
311
    heart = instance_create(heart_x, heart_y, obj_date_heart);
312
heart.depth = depth - 300;
313
bugfix_depth_con = 0;
314
bg_speed = 1;
315
bg_speed_y = 1;
316
bg_speed_max = 1;
317
bg_speed_y_max = 1;
318
first_text = "";
319
second_text = "";
320
multi_color_text_con = 0;
321
multi_color_text_timer = 0;
322
show_circle1 = 0;
323
show_circle1timer = 0;
324
show_circle2 = 0;
325
show_circle2timer = 0;
326
surface1 = -4;
327
surface2 = -4;
328
surface1_x = camerax() - 320;
329
surface2_x = camerax() + 640;
330
pinkportraitalpha = 0;
331
pinkportraitalpha2 = 0;
332
shaketext_x = 0;
333
shakeportrait_x = 0;
334
shakeportrait_strength = 0;
335
grav = -8;
336
if (obj_pink_enemy.datecount == 4)
337
{
338
    pinkportrait = 2588;
339
    pinkportrait2 = 3412;
340
    mus_fade(global.batmusic[1], 30);
341
    portrait2_xscale = -2;
342
    pinkportrait_x = 200;
343
    pinkportrait2_x = 414;
344
    pinkportraitalpha2 = 0;
345
}
346
saveportrait1 = pinkportrait;
347
saveportrait2 = pinkportrait2;
348
surface2x[0] = 0;
349
surface2x[1] = 0;
350
surface2x[2] = 0;
351
surface2x[3] = 0;
352
surface2x[4] = 0;
353
surface2x[5] = 0;
354
surface2x[6] = 0;
355
surface2xscale[0] = 0;
356
surface2xscale[1] = 0;
357
surface2xscale[2] = 0;
358
surface2xscale[3] = 0;
359
surface2xscale[4] = 0;
360
surface2xscale[5] = 0;
361
surface2xscale[6] = 0;
362
hero_state = "idle";
363
hero_state_timer = 0;
364
ui_alpha = 0;
365
if (obj_pink_enemy.datecount > 1)
366
    ui_alpha = 1;
367
dialoguebox_alpha = 0;
368
bluramt = 0;
369
blursurf = -4;
370
blurshader = 0;
371
eyeshafttimer = 0;
372
goawaystring = stringsetloc(
GO... AWAY...!
"GO... AWAY...!", "obj_date_controller_slash_Create_0_gml_370_0"
);
373
clutching_head_string = stringsetloc(
I... hate... dating... mew...
"I... hate... dating... mew...", "obj_date_controller_slash_Create_0_gml_372_0"
);
374
clutching_head_string2 = stringsetloc(
I.. love... dating... mew
"I.. love... dating... mew", "obj_date_controller_slash_Create_0_gml_373_0"
);
375
thickness = 2;
376
wave_siner = 0;
377
distortsiner = 0;
378
date3endingcon = 0;
379
date3endingtimer = 0;
380
invertbgalpha = 0;
381
if (obj_pink_enemy.datecount == 3)
382
{
383
    pinkportrait_x = 230;
384
    pinkportrait2 = 5450;
385
    mus_volume(global.batmusic[0], 0, 30);
386
    mus_volume(global.batmusic[1], 0, 30);
387
}
388
date3con = 0;