Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_minigame_evaluation_Create_0

(view raw script w/o annotations or w/e)
1
depth = -99999999;
2
with (obj_mainchara)
3
    cutscene = 1;
4
con = 0;
5
timer = 0;
6
rcon = 0;
7
rtimer = 0;
8
reachedend_draw_triangle_siner = 0;
9
bgcolor = make_color_rgb(63, 72, 204);
10
yyscroll = 0;
11
totaltime = 100;
12
battlepoints = 0;
13
totalpoints = 0;
14
physicalchallengepoints = 0;
15
battlepoints = global.flag[1116 points_from_battle];
16
totalpoints = global.flag[1117 points_spent];
17
physicalchallengepoints = global.flag[1118 last_minigame_points];
18
setboardranking = false;
19
if (room == room_dw_rhythm)
20
    physicalchallengepoints = global.flag[1118 last_minigame_points];
21
tallestever = false;
22
maxstack = 0;
23
foodwasted = 0;
24
customersfe = 0;
25
physicalchallengeletter = "C";
26
chef_rank_letter = "Z";
27
tchefvar = 0;
28
if (i_ex(global.chapter == 3 && obj_chefs_game))
29
{
30
    physicalchallengeletter = obj_chefs_game.rank;
31
    maxstack = obj_chefs_game.maxstack;
32
    foodwasted = obj_chefs_game.foodwasted;
33
    customersfed = obj_chefs_game.customersfed;
34
    chef_rank_letter = obj_chefs_game.rank;
35
    if (obj_chefs_game.t_rank == true)
36
        chef_rank_letter = "T";
37
    if (maxstack > global.flag[1242 best_food_stack])
38
    {
39
        tallestever = true;
40
        global.flag[1242 best_food_stack] = maxstack;
41
    }
42
}
43
global.flag[1116 points_from_battle] = 0;
44
global.flag[1117 points_spent] = 0;
45
global.flag[1118 last_minigame_points] = 0;
46
secretitemfound = false;
47
extrakeycount = 0;
48
mossfound = global.flag[1078 got_ch3_moss];
49
extrapicturecount = 0;
50
totalbattles = 3;
51
boardnumber = 1;
52
replayversion = false;
53
if (global.chapter == 3 && room == room_dw_chef)
54
{
55
    totalbattles = global.flag[1049 board_1_battles];
56
    boardnumber = 1;
57
    if (i_ex(obj_chefs_game))
58
        replayversion = obj_chefs_game.replayversion;
59
    if (global.flag[1122 board_key_count_2] > 3)
60
    {
61
        extrakeycount = 1;
62
        secretitemfound = true;
63
    }
64
    if (global.flag[1122 board_key_count_2] > 4)
65
    {
66
        extrakeycount = 2;
67
        secretitemfound = true;
68
    }
69
}
70
if (room == room_dw_rhythm)
71
{
72
    totalbattles = global.flag[1171 board_2_battles];
73
    boardnumber = 2;
74
    maxcombo = -1;
75
    if (i_ex(obj_rhythmgame))
76
    {
77
        replayversion = obj_rhythmgame.replayversion;
78
        maxcombo = obj_rhythmgame.max_combo;
79
        debug_print("max combo=" + string(maxcombo));
80
    }
81
    if ((global.flag[1041 got_half_flower] + global.flag[1042 got_spring_photo] + global.flag[1043 got_cactus_photo] + global.flag[1227 got_antlion_photo]) == 4)
82
    {
83
        secretitemfound = true;
84
        extrapicturecount = 1;
85
    }
86
}
87
if (global.chapter == 3 && room == room_dw_susiezilla)
88
{
89
    totalbattles = global.flag[1172];
90
    boardnumber = 3;
91
    replayversion = true;
92
}
93
star_anim = 0;
94
star_anim_speed = 0.5;
95
bg_speed = 1;
96
bg_speed_y = 1;
97
bg_speed_max = 3;
98
bg_speed_y_max = 3;
99
start_y = cameray();
100
final_y = cameray() + room_height;
101
y = start_y;
102
bg_y = -640;
103
bg_y_extra = 0;
104
bg_x_extra = 0;
105
_lettergrade = "";
106
musicstarted = false;
107
global.flag[1116 points_from_battle] = 0;
108
global.battlegrade[30] = 0;
109
roundcompletetext1 = stringsetloc(
ROUND#COMPLETE#YOU GOT#
"ROUND#COMPLETE#YOU GOT#", "obj_round_evaluation_slash_Create_0_gml_57_0"
);
110
roundcompletetext2 = stringsetloc(
RANK
"RANK", "obj_round_evaluation_slash_Create_0_gml_58_0"
);
111
white_overlay = false;
112
white_overlay_alpha = 0;
113
114
show_overlay = function(arg0)
115
{
116
    white_overlay = true;
117
    white_overlay_alpha = 0;
118
    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("white_overlay_alpha", 0, 1, arg0);
119
};
120
121
tv_vignette = false;
122
tv_vignette_alpha = 0;
123
124
show_vignette = function(arg0)
125
{
126
    tv_vignette = true;
127
    tv_vignette_alpha = 0;
128
    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("tv_vignette_alpha", 0, 1, arg0);
129
};
130
131
gradetimer = -8;
132
gradecon = 0;
133
for (var i = 0; i < 20; i++)
134
    _battlegrade[i] = "Z";
135
currenttotalpoints = 0;
136
currentphyspoints = 0;
137
currentbattlegrade = "?-RANK";
138
currenttotalgrade = "?-RANK";
139
currentphysgrade = "?-RANK";
140
c_pink = make_color_rgb(248, 173, 227);
141
missednotes = 0;
142
normalnotes = 0;
143
goldnotes = 0;
144
if (i_ex(obj_rhythmgame))
145
{
146
    missednotes = obj_rhythmgame.savemiss;
147
    normalnotes = obj_rhythmgame.saveokay + obj_rhythmgame.savegood;
148
    goldnotes = obj_rhythmgame.savegreat;
149
}
150
dtype = 0;
151
152
function sp_draw_text(arg0, arg1, arg2)
153
{
154
    var shadcolor = #060B3C;
155
    var shadalph = 0.65;
156
    var shadoff = 2;
157
    var memcol = draw_get_color();
158
    var memalph = draw_get_alpha();
159
    draw_set_color(shadcolor);
160
    draw_set_alpha(shadalph);
161
    draw_text(arg0 + shadoff, arg1 + shadoff, arg2);
162
    draw_set_color(memcol);
163
    draw_set_alpha(memalph);
164
    draw_text(arg0, arg1, arg2);
165
}
166
167
function checkskip(arg0, arg1)
168
{
169
    var _skip = false;
170
    if (timer > (arg0 + 5) && timer < (arg1 - 1))
171
    {
172
        if (button3_h())
173
            _skip = true;
174
    }
175
    if (timer > (arg0 + 1) && timer < (arg1 - 1))
176
    {
177
        if (button1_p())
178
            _skip = true;
179
    }
180
    if (_skip)
181
    {
182
        timer = arg1 - 1;
183
        _skip = false;
184
    }
185
}
186
187
function rcheckskip(arg0, arg1)
188
{
189
    var _skip = false;
190
    if (rtimer > (arg0 + 5) && rtimer < (arg1 - 1))
191
    {
192
        if (button3_h())
193
            _skip = true;
194
    }
195
    if (rtimer > (arg0 + 1) && rtimer < (arg1 - 1))
196
    {
197
        if (button1_p())
198
            _skip = true;
199
    }
200
    if (_skip)
201
    {
202
        rtimer = arg1 - 1;
203
        _skip = false;
204
    }
205
}
206
207
bouncebuff = 0;
208
bouncecount = 0;
209
shakeobj = 0;
210
debugbarcon = 0;
211
debugbartimer = 0;
212
debugbarvalue = 5;
213
debugbarrank = "Z";
214
rank1total = 800 + (totalbattles * 230);
215
rank1phy = 500;
216
currentgraderank = 5;
217
currentbattlerank = 5;
218
currenttotalpointsrank = 5;
219
currentphychallengerank = -1;
220
currentsecretcount = 0;
221
currentgradetotal = 0;
222
currentgradetotalmax = 40;
223
gradenumber = 0;
224
lettergrade = "";
225
battlegrade = "";
226
secretset1 = 0;
227
secretset2 = 0;
228
savebattlepoints = -1;
229
savetotalpoints = -1;
230
savephypoints = -1;
231
savekey1 = -1;
232
savekey2 = -1;
233
madesound = false;
234
annoyingdog = false;
235
sndplayed = 0;
236
fader = 0;