|
1
|
with (obj_collidebullet)
|
|
2
|
{
|
|
3
|
target = 1;
|
|
4
|
damage = 0;
|
|
5
|
global.hp[target] = global.maxhp[target];
|
|
6
|
}
|
|
7
|
with (obj_face)
|
|
8
|
depth = -2;
|
|
9
|
with (obj_writer)
|
|
10
|
prevent_mash_buffer = 3;
|
|
11
|
if (!(global.is_console || onSteamDeck()))
|
|
12
|
{
|
|
13
|
if (audio_get_recorder_count() == 0 && global.right_click_mic == 0)
|
|
14
|
global.right_click_mic = 2;
|
|
15
|
}
|
|
16
|
if (phase == 0 && canclick)
|
|
17
|
{
|
|
18
|
global.msgno = 0;
|
|
19
|
for (i = 0; i < 100; i++)
|
|
20
|
global.msg[i] = stringsetloc("", "obj_mike_minigame_controller_slash_Step_0_gml_38_0");
|
|
21
|
with (obj_mike_controller)
|
|
22
|
x = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (x, 320, 10);
|
|
23
|
with (obj_heroparent)
|
|
24
|
{
|
|
25
|
if (place_meeting(x, y, obj_hand_collision) && x == xstart)
|
|
26
|
{
|
|
27
|
other.phase = 999;
|
|
28
|
other.petting = 0;
|
|
29
|
other.alarm[5] = 15;
|
|
30
|
with (obj_mike_battle)
|
|
31
|
{
|
|
32
|
move = true;
|
|
33
|
spd = 16;
|
|
34
|
}
|
|
35
|
with (obj_writer)
|
|
36
|
instance_destroy();
|
|
37
|
with (obj_hand_collision)
|
|
38
|
instance_destroy();
|
|
39
|
}
|
|
40
|
}
|
|
41
|
with (obj_mike_battle)
|
|
42
|
{
|
|
43
|
if (place_meeting(x, y, obj_hand_collision) && x == newx)
|
|
44
|
{
|
|
45
|
act = 1;
|
|
46
|
other.phase = 1;
|
|
47
|
other.petting = 3;
|
|
48
|
blush = 50;
|
|
49
|
mus_volume(global.batmusic[1], 1, 10);
|
|
50
|
with (obj_hand_collision)
|
|
51
|
instance_destroy();
|
|
52
|
}
|
|
53
|
}
|
|
54
|
}
|
|
55
|
if (phase == 2)
|
|
56
|
{
|
|
57
|
with (obj_mike_battle)
|
|
58
|
move = true;
|
|
59
|
with (obj_heroparent)
|
|
60
|
{
|
|
61
|
if (other.alarm[5] <= 0)
|
|
62
|
x = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (x, xstart - 300, 8);
|
|
63
|
}
|
|
64
|
}
|
|
65
|
else
|
|
66
|
{
|
|
67
|
if (move_party)
|
|
68
|
{
|
|
69
|
with (obj_darkener)
|
|
70
|
darken = 0;
|
|
71
|
}
|
|
72
|
with (obj_heroparent)
|
|
73
|
{
|
|
74
|
if (other.alarm[5] <= 0)
|
|
75
|
x = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (x, xstart, 8);
|
|
76
|
}
|
|
77
|
with (obj_mike_controller)
|
|
78
|
hand_distance = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (hand_distance, 240, 8);
|
|
79
|
}
|
|
80
|
if (phase == 1)
|
|
81
|
{
|
|
82
|
phase = 2;
|
|
83
|
timer = 0;
|
|
84
|
wave = 0;
|
|
85
|
alpha = 1;
|
|
86
|
talking = false;
|
|
87
|
life = 3;
|
|
88
|
difficulty = 0;
|
|
89
|
if (!instance_exists(obj_darkener))
|
|
90
|
instance_create(0, 0, obj_darkener);
|
|
91
|
with (obj_darkener)
|
|
92
|
depth = obj_herokris.depth + 1;
|
|
93
|
with (obj_writer)
|
|
94
|
instance_destroy();
|
|
95
|
switch (obj_mike_battle.sprite_index)
|
|
96
|
{
|
|
97
|
case spr_mike_m:
|
|
98
|
action = 1;
|
|
99
|
break;
|
|
100
|
case spr_mike_med:
|
|
101
|
action = 1;
|
|
102
|
break;
|
|
103
|
case spr_mike_l:
|
|
104
|
action = 2;
|
|
105
|
break;
|
|
106
|
case spr_mike_big:
|
|
107
|
action = 2;
|
|
108
|
break;
|
|
109
|
case spr_mike_s:
|
|
110
|
action = 3;
|
|
111
|
break;
|
|
112
|
case spr_mike_small:
|
|
113
|
action = 3;
|
|
114
|
break;
|
|
115
|
}
|
|
116
|
with (obj_mike_controller)
|
|
117
|
mic_reset();
|
|
118
|
}
|
|
119
|
if (phase == 2)
|
|
120
|
{
|
|
121
|
if (action == 1)
|
|
122
|
event_user(10);
|
|
123
|
if (action == 2)
|
|
124
|
{
|
|
125
|
timer++;
|
|
126
|
combo_buffer++;
|
|
127
|
countdown--;
|
|
128
|
with (obj_mike_controller)
|
|
129
|
{
|
|
130
|
x = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (x, 140, 10);
|
|
131
|
if (other.wave == 2)
|
|
132
|
hand_distance = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (hand_distance, 240, 10);
|
|
133
|
else
|
|
134
|
hand_distance = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (hand_distance, 120, 10);
|
|
135
|
}
|
|
136
|
if (wave == 0)
|
|
137
|
{
|
|
138
|
myscore = 0;
|
|
139
|
mus_volume(global.batmusic[1], 1, 10);
|
|
140
|
with (obj_mike_controller)
|
|
141
|
type = 5;
|
|
142
|
countdown = 1860;
|
|
143
|
repeat (5)
|
|
144
|
instance_create_depth(80 + irandom_range(-20, 20), 280 + irandom_range(-20, 20), depth + 1, obj_gravity_ball);
|
|
145
|
if (!i_ex(obj_gravity_hoop))
|
|
146
|
instance_create_depth(room_width - 140, 180, depth + 2, obj_gravity_hoop);
|
|
147
|
if (!i_ex(obj_volumebar))
|
|
148
|
instance_create_depth(0, 0, depth + 2, obj_volumebar);
|
|
149
|
wave = 1;
|
|
150
|
}
|
|
151
|
if (wave == 1)
|
|
152
|
{
|
|
153
|
if (countdown <= 0)
|
|
154
|
{
|
|
155
|
wave = 2;
|
|
156
|
mus_volume(global.batmusic[1], 0.25, 10);
|
|
157
|
with (obj_mike_minigame_tv)
|
|
158
|
{
|
|
159
|
latestscore[minigame] = other.myscore;
|
|
160
|
if (other.myscore > hiscore[minigame])
|
|
161
|
{
|
|
162
|
hiscore[minigame] = other.myscore;
|
|
163
|
global.flag[1699] = other.myscore;
|
|
164
|
snd_play(snd_won);
|
|
165
|
other.new_hiscore = 120;
|
|
166
|
}
|
|
167
|
else
|
|
168
|
{
|
|
169
|
snd_play(snd_coin);
|
|
170
|
}
|
|
171
|
}
|
|
172
|
}
|
|
173
|
}
|
|
174
|
if (game_over)
|
|
175
|
{
|
|
176
|
myscore = 0;
|
|
177
|
timer = 0;
|
|
178
|
phase = 3;
|
|
179
|
with (obj_gravity_ball)
|
|
180
|
{
|
|
181
|
scr_sparklescr_sparkle
function scr_sparkle(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_pos(arg0, arg1, arg2)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(arg1 + lengthdir_x(16, dir + ((i / num) * 360)), arg2 + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_colour(arg0, arg1)
{
var num = arg0;
dir = 0;
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 5, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
_ob.image_blend = arg1;
}
}
function scr_sparkle_random(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
with (instance_create_depth(x + lengthdir_x(16, (i / num) * 360), y + lengthdir_y(16, (i / num) * 360), depth - 1, obj_heart_sparkle))
motion_set(other.dir, irandom_range(4, 6));
dir += irandom(30);
}
} (8);
|
|
182
|
instance_destroy();
|
|
183
|
}
|
|
184
|
with (obj_gravity_hoop)
|
|
185
|
{
|
|
186
|
scr_sparklescr_sparkle
function scr_sparkle(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_pos(arg0, arg1, arg2)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(arg1 + lengthdir_x(16, dir + ((i / num) * 360)), arg2 + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_colour(arg0, arg1)
{
var num = arg0;
dir = 0;
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 5, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
_ob.image_blend = arg1;
}
}
function scr_sparkle_random(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
with (instance_create_depth(x + lengthdir_x(16, (i / num) * 360), y + lengthdir_y(16, (i / num) * 360), depth - 1, obj_heart_sparkle))
motion_set(other.dir, irandom_range(4, 6));
dir += irandom(30);
}
} (8);
|
|
187
|
instance_destroy();
|
|
188
|
}
|
|
189
|
}
|
|
190
|
}
|
|
191
|
if (action == 3)
|
|
192
|
{
|
|
193
|
if (wave == 0)
|
|
194
|
{
|
|
195
|
mus_volume(global.batmusic[1], 1, 10);
|
|
196
|
with (obj_mike_controller)
|
|
197
|
type = 8;
|
|
198
|
if (!i_ex(obj_volumebar))
|
|
199
|
instance_create_depth(0, 0, depth + 2, obj_volumebar);
|
|
200
|
fuel = 100;
|
|
201
|
myscore = 0;
|
|
202
|
wave = 1;
|
|
203
|
timer = 10;
|
|
204
|
level_timer = 0;
|
|
205
|
level = 1;
|
|
206
|
cave_speed = 30;
|
|
207
|
cave_speed2 = cave_speed;
|
|
208
|
cave_direction = 0;
|
|
209
|
cave_height = 110;
|
|
210
|
cave_y = 190;
|
|
211
|
cave_last_top = -1;
|
|
212
|
cave_last_bottom = -1;
|
|
213
|
cave_angle[0] = 0;
|
|
214
|
cave_angle[1] = 5;
|
|
215
|
cave_max = 1;
|
|
216
|
timer = 0;
|
|
217
|
obj_mike_controller.vis = true;
|
|
218
|
cat_timer = 60;
|
|
219
|
cat_max = 60;
|
|
220
|
meteor_timer = 0;
|
|
221
|
meteor_max = 60;
|
|
222
|
meteor_number = 2;
|
|
223
|
}
|
|
224
|
var _vol = obj_mike_controller.microphone_volume / 100;
|
|
225
|
timer++;
|
|
226
|
cave_timer++;
|
|
227
|
meteor_timer++;
|
|
228
|
cat_timer++;
|
|
229
|
level_timer++;
|
|
230
|
with (obj_mike_controller)
|
|
231
|
{
|
|
232
|
x = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (x, 160, 10);
|
|
233
|
hand_distance = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (hand_distance, 120, 10);
|
|
234
|
if (mx > x)
|
|
235
|
hand_xscale = -1;
|
|
236
|
else
|
|
237
|
hand_xscale = 1;
|
|
238
|
}
|
|
239
|
if (wave == 1)
|
|
240
|
{
|
|
241
|
_vol = 0;
|
|
242
|
if (timer > 30)
|
|
243
|
{
|
|
244
|
cave_speed2 = 4;
|
|
245
|
cave_height = 120;
|
|
246
|
wave = 2;
|
|
247
|
cave_speed = 4;
|
|
248
|
cave_max = 2;
|
|
249
|
}
|
|
250
|
}
|
|
251
|
if (level_timer > 149)
|
|
252
|
{
|
|
253
|
cave_speed2 = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (cave_speed2, 18, 0.5);
|
|
254
|
meteor_number = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (meteor_number, 11, 0.25);
|
|
255
|
meteor_max = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (meteor_max, 40, 2);
|
|
256
|
cat_max = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (cat_max, 30, 1);
|
|
257
|
level_timer = 0;
|
|
258
|
}
|
|
259
|
if (wave > 0 && wave < 3)
|
|
260
|
{
|
|
261
|
cave_speed = lerp(cave_speed, cave_speed2 + (1 + (_vol * 10)), 0.5);
|
|
262
|
if (cave_speed >= 20)
|
|
263
|
cave_speed = 20;
|
|
264
|
var _catheld = 0;
|
|
265
|
if (obj_mike_controller.hand_type == 2)
|
|
266
|
_catheld = 0.23;
|
|
267
|
fuel = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (fuel, 0, 0.1 + _catheld);
|
|
268
|
last_fuel = lerp(last_fuel, fuel, 0.1);
|
|
269
|
if (cave_timer > cave_max)
|
|
270
|
{
|
|
271
|
cave_timer = 0;
|
|
272
|
if (cave_last_top == -1)
|
|
273
|
{
|
|
274
|
cave_last_top = create_wall(room_width, cave_y - cave_height, 50, 0);
|
|
275
|
}
|
|
276
|
else
|
|
277
|
{
|
|
278
|
var _newx = cave_last_top.x + lengthdir_x(cave_last_top.image_xscale, cave_last_top.image_angle);
|
|
279
|
var _newy = cave_last_top.y + lengthdir_y(cave_last_top.image_xscale, cave_last_top.image_angle);
|
|
280
|
var _newangle = irandom_range(-2, 2);
|
|
281
|
if (_newy < (cave_y - cave_height - 10))
|
|
282
|
_newangle = irandom_range(-2, -8);
|
|
283
|
if (_newy > ((cave_y - cave_height) + 10))
|
|
284
|
_newangle = irandom_range(2, 8);
|
|
285
|
if (_newx < 2000)
|
|
286
|
{
|
|
287
|
var _a = create_wall(_newx, _newy, irandom_range(60, 120), _newangle + cave_direction);
|
|
288
|
cave_last_top.next = _a;
|
|
289
|
cave_last_top = _a;
|
|
290
|
with (cave_last_top)
|
|
291
|
{
|
|
292
|
image_yscale = -200;
|
|
293
|
if (other.cave_direction != 0)
|
|
294
|
scroll_up = true;
|
|
295
|
}
|
|
296
|
}
|
|
297
|
}
|
|
298
|
if (cave_last_bottom == -1)
|
|
299
|
{
|
|
300
|
cave_last_bottom = create_wall(room_width, cave_y + cave_height, 50, 0);
|
|
301
|
}
|
|
302
|
else
|
|
303
|
{
|
|
304
|
var _newx = cave_last_bottom.x + lengthdir_x(cave_last_bottom.image_xscale, cave_last_bottom.image_angle);
|
|
305
|
var _newy = cave_last_bottom.y + lengthdir_y(cave_last_bottom.image_xscale, cave_last_bottom.image_angle);
|
|
306
|
var _newangle = irandom_range(-2, 2);
|
|
307
|
if (_newy < ((cave_y + cave_height) - 10))
|
|
308
|
_newangle = irandom_range(-2, -8);
|
|
309
|
if (_newy > (cave_y + cave_height + 10))
|
|
310
|
_newangle = irandom_range(2, 8);
|
|
311
|
if (_newx < 2000)
|
|
312
|
{
|
|
313
|
var _a = create_wall(_newx, _newy, irandom_range(60, 120), _newangle + cave_direction);
|
|
314
|
cave_last_bottom.next = _a;
|
|
315
|
cave_last_bottom = _a;
|
|
316
|
with (cave_last_bottom)
|
|
317
|
{
|
|
318
|
image_yscale = 200;
|
|
319
|
if (other.cave_direction != 0)
|
|
320
|
scroll_up = true;
|
|
321
|
}
|
|
322
|
}
|
|
323
|
}
|
|
324
|
if (cave_height > 100)
|
|
325
|
cave_height = 100;
|
|
326
|
}
|
|
327
|
}
|
|
328
|
if (frac(level_timer / 30) == 0)
|
|
329
|
{
|
|
330
|
myscore += (round((cave_speed * cave_speed) / 10) + 10);
|
|
331
|
if (cave_speed >= 19)
|
|
332
|
myscore += 200;
|
|
333
|
}
|
|
334
|
if (fuel <= 25)
|
|
335
|
{
|
|
336
|
var rate = 10;
|
|
337
|
if (fuel <= 10)
|
|
338
|
rate = 3;
|
|
339
|
if (fuel <= 0)
|
|
340
|
rate = 6;
|
|
341
|
if ((cave_timer % rate) == 0)
|
|
342
|
{
|
|
343
|
with (scr_marker_extscr_marker_ext
function scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{
var thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
depth = arg8;
sprite_index = arg2;
image_speed = arg5;
image_xscale = arg3;
image_yscale = arg4;
image_index = arg6;
image_blend = arg7;
image_alpha = arg11;
if (arg9)
scr_depth_alt();
}
if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker;
}
function scr_marker_fromasset(arg0, arg1 = depth, arg2 = false)
{
if (is_undefined(arg0))
{
debug_message("Warning: scr_marker_fromasset() sprite_instance didn't exist");
return -4;
}
var sprite = layer_sprite_get_sprite(arg0);
var index = layer_sprite_get_index(arg0);
var imagespeed = layer_sprite_get_speed(arg0);
var xscale = layer_sprite_get_xscale(arg0);
var yscale = layer_sprite_get_yscale(arg0);
var angle = layer_sprite_get_angle(arg0);
var blend = layer_sprite_get_blend(arg0);
var alpha = layer_sprite_get_alpha(arg0);
var xloc = layer_sprite_get_x(arg0);
var yloc = layer_sprite_get_y(arg0);
var thismarker = instance_create_depth(xloc, yloc, arg1, obj_marker);
with (thismarker)
{
sprite_index = sprite;
image_index = index;
image_speed = imagespeed;
image_xscale = xscale;
image_yscale = yscale;
image_angle = angle;
image_blend = blend;
image_alpha = alpha;
if (arg2)
scr_depth_alt(id, arg2);
}
return thismarker;
}
function scr_assetgetinfo(arg0)
{
var sprite = layer_sprite_get_sprite(arg0);
var index = layer_sprite_get_index(arg0);
var xloc = layer_sprite_get_x(arg0);
var yloc = layer_sprite_get_y(arg0);
var xscale = layer_sprite_get_xscale(arg0);
var yscale = layer_sprite_get_yscale(arg0);
var angle = layer_sprite_get_angle(arg0);
var blend = layer_sprite_get_blend(arg0);
var alpha = layer_sprite_get_alpha(arg0);
var imagespeed = layer_sprite_get_speed(arg0);
return [sprite, index, xloc, yloc, xscale, yscale, angle, blend, alpha, imagespeed];
} (obj_heart.x + 10, obj_heart.y + 10, spr_cakesmoke))
|
|
344
|
{
|
|
345
|
image_speed = 1;
|
|
346
|
depth = obj_heart.depth - 1;
|
|
347
|
vspeed = random_range(-2, 2);
|
|
348
|
hspeed = (other.cave_speed * -1) - random(2);
|
|
349
|
scr_lerpvar_instancescr_lerpvar_instance
function scr_lerpvar_instance()
{
__lerpvar = instance_create(0, 0, obj_lerpvar);
__lerpvar.target = argument[0];
__lerpvar.varname = argument[1];
__lerpvar.pointa = argument[2];
__lerpvar.pointb = argument[3];
__lerpvar.maxtime = argument[4];
if (argument_count >= 6)
__lerpvar.easetype = argument[5];
if (argument_count >= 7)
__lerpvar.easeinout = argument[6];
return __lerpvar;
}
function scr_lerp_var_instance()
{
if (argument_count >= 6)
return scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
return scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
return scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
}
function scr_lerp_instance_var()
{
if (argument_count >= 6)
return scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
return scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
return scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
} (id, "image_alpha", 0.9, 0, 10);
|
|
350
|
scr_doomscr_doom
function scr_doom(arg0 = id, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{
alarm[0]
target = arg0;
persistent = arg0.persistent;
}
} (id, 10);
|
|
351
|
scr_darksizescr_darksize
function scr_darksize()
{
var inst = id;
if (argument_count)
inst = argument0;
inst.image_xscale = 2;
inst.image_yscale = 2;
} (id);
|
|
352
|
if (other.fuel <= 0)
|
|
353
|
{
|
|
354
|
sprite_index = spr_realisticexplosion;
|
|
355
|
snd_stop(snd_badexplosion);
|
|
356
|
snd_play(snd_badexplosion, 0.5, 1 + random_range(-0.1, 0.1));
|
|
357
|
}
|
|
358
|
else
|
|
359
|
{
|
|
360
|
snd_play(snd_wing, 0.5, 1 + random(0.1));
|
|
361
|
}
|
|
362
|
}
|
|
363
|
}
|
|
364
|
}
|
|
365
|
if (wave == 2)
|
|
366
|
{
|
|
367
|
if (meteor_timer > meteor_max)
|
|
368
|
{
|
|
369
|
meteor_timer = 0;
|
|
370
|
randomize();
|
|
371
|
for (var _i = 0; _i < meteor_number; _i++)
|
|
372
|
{
|
|
373
|
var _newy = cave_y + irandom_range(-cave_height * 0.85, cave_height * 0.85);
|
|
374
|
if (cave_last_top != -1 && cave_last_bottom != -1)
|
|
375
|
_newy = choose(cave_last_top.y + irandom_range(cave_height * 0.1, cave_height * 0.9), cave_last_bottom.y - irandom_range(cave_height * 0.1, cave_height * 0.9));
|
|
376
|
with (instance_create_depth(room_width + 50 + (_i * 130), _newy, depth - 2, obj_meteor))
|
|
377
|
{
|
|
378
|
while (collision_circle(x, y, 32, obj_meteor, 1, 1))
|
|
379
|
{
|
|
380
|
var _dir = point_direction(other.x, other.y, x, y);
|
|
381
|
x += lengthdir_x(4, _dir);
|
|
382
|
y += lengthdir_y(4, _dir);
|
|
383
|
}
|
|
384
|
}
|
|
385
|
}
|
|
386
|
}
|
|
387
|
if (cat_timer > (cat_max / max(1, _vol * 4)))
|
|
388
|
{
|
|
389
|
cat_timer = 0;
|
|
390
|
var _newy = cave_y + irandom_range(-cave_height * 0.85, cave_height * 0.85);
|
|
391
|
if (cave_last_top != -1 && cave_last_bottom != -1)
|
|
392
|
_newy = choose(cave_last_top.y + irandom_range(cave_height * 0.35, cave_height * 0.85), cave_last_bottom.y - irandom_range(cave_height * 0.35, cave_height * 0.85));
|
|
393
|
var _cat = 378;
|
|
394
|
if (_vol < 0.1)
|
|
395
|
_cat = choose(378, 378, 788);
|
|
396
|
instance_create_depth(room_width + 80, _newy, depth - 2, _cat);
|
|
397
|
}
|
|
398
|
}
|
|
399
|
var _move_spd = 2;
|
|
400
|
with (obj_meteor)
|
|
401
|
{
|
|
402
|
angle += (rotate_speed * myside);
|
|
403
|
x += lengthdir_x(other.cave_speed, other.cave_direction - 180);
|
|
404
|
var _col = collision_circle(x, y, 4, obj_cavern_wall, 1, 0);
|
|
405
|
if (_col)
|
|
406
|
{
|
|
407
|
var _dir = point_direction(x, y, x, y - _col.image_yscale);
|
|
408
|
x += lengthdir_x(_move_spd, _dir);
|
|
409
|
y += lengthdir_y(_move_spd, _dir);
|
|
410
|
}
|
|
411
|
_col = collision_circle(x, y, 32, obj_meteor, 1, 1);
|
|
412
|
if (_col)
|
|
413
|
{
|
|
414
|
var _dir = point_direction(other.x, other.y, x, y);
|
|
415
|
x += lengthdir_x(_move_spd, _dir);
|
|
416
|
y += lengthdir_y(_move_spd, _dir);
|
|
417
|
}
|
|
418
|
}
|
|
419
|
with (obj_blue_cat)
|
|
420
|
{
|
|
421
|
x += lengthdir_x(other.cave_speed, other.cave_direction - 180);
|
|
422
|
if (action == 0 && speed == 0)
|
|
423
|
{
|
|
424
|
var _col = collision_circle(x, y, 10, obj_cavern_wall, 1, 0);
|
|
425
|
if (_col)
|
|
426
|
{
|
|
427
|
var _dir = point_direction(x, y, x, y - _col.image_yscale);
|
|
428
|
x += lengthdir_x(_move_spd, _dir);
|
|
429
|
y += lengthdir_y(_move_spd, _dir);
|
|
430
|
}
|
|
431
|
}
|
|
432
|
}
|
|
433
|
with (obj_green_cat)
|
|
434
|
{
|
|
435
|
x += lengthdir_x(other.cave_speed, other.cave_direction - 180);
|
|
436
|
if (action == 0)
|
|
437
|
{
|
|
438
|
var _col = collision_circle(x, y, 10, obj_cavern_wall, 1, 0);
|
|
439
|
if (_col)
|
|
440
|
{
|
|
441
|
var _dir = point_direction(x, y, x, y - _col.image_yscale);
|
|
442
|
x += lengthdir_x(_move_spd, _dir);
|
|
443
|
y += lengthdir_y(_move_spd, _dir);
|
|
444
|
}
|
|
445
|
}
|
|
446
|
}
|
|
447
|
with (obj_gold_cat)
|
|
448
|
{
|
|
449
|
x += lengthdir_x(other.cave_speed, other.cave_direction - 180);
|
|
450
|
if (action == 0)
|
|
451
|
{
|
|
452
|
var _col = collision_circle(x, y, 10, obj_cavern_wall, 1, 0);
|
|
453
|
if (_col)
|
|
454
|
{
|
|
455
|
var _dir = point_direction(x, y, x, y - _col.image_yscale);
|
|
456
|
x += lengthdir_x(_move_spd, _dir);
|
|
457
|
y += lengthdir_y(_move_spd, _dir);
|
|
458
|
}
|
|
459
|
}
|
|
460
|
}
|
|
461
|
var _cave_scroll = false;
|
|
462
|
with (obj_cavern_wall)
|
|
463
|
{
|
|
464
|
x += lengthdir_x(other.cave_speed, other.cave_direction - 180);
|
|
465
|
if (x > (obj_heart.x - 10) && x < obj_heart.x)
|
|
466
|
{
|
|
467
|
if (scroll_up)
|
|
468
|
_cave_scroll = true;
|
|
469
|
}
|
|
470
|
}
|
|
471
|
var _scroll_speed = 1;
|
|
472
|
var _volume_speed = 0;
|
|
473
|
with (obj_cavern_wall)
|
|
474
|
{
|
|
475
|
y += (_vol * _volume_speed);
|
|
476
|
if (_cave_scroll)
|
|
477
|
y += _scroll_speed;
|
|
478
|
}
|
|
479
|
with (obj_green_cat)
|
|
480
|
{
|
|
481
|
y += (_vol * _volume_speed);
|
|
482
|
if (_cave_scroll)
|
|
483
|
y += _scroll_speed;
|
|
484
|
}
|
|
485
|
with (obj_gold_cat)
|
|
486
|
{
|
|
487
|
y += (_vol * _volume_speed);
|
|
488
|
if (_cave_scroll)
|
|
489
|
y += _scroll_speed;
|
|
490
|
}
|
|
491
|
with (obj_blue_cat)
|
|
492
|
{
|
|
493
|
y += (_vol * _volume_speed);
|
|
494
|
if (_cave_scroll)
|
|
495
|
y += _scroll_speed;
|
|
496
|
}
|
|
497
|
with (obj_meteor)
|
|
498
|
{
|
|
499
|
y += (_vol * _volume_speed);
|
|
500
|
if (_cave_scroll)
|
|
501
|
y += _scroll_speed;
|
|
502
|
}
|
|
503
|
with (obj_heart_sparkle)
|
|
504
|
{
|
|
505
|
x += lengthdir_x(other.cave_speed, other.cave_direction - 180);
|
|
506
|
y += (_vol * _volume_speed);
|
|
507
|
}
|
|
508
|
with (obj_gravity_text)
|
|
509
|
{
|
|
510
|
x += lengthdir_x(other.cave_speed, other.cave_direction - 180);
|
|
511
|
y += (_vol * _volume_speed);
|
|
512
|
}
|
|
513
|
if (fuel == 0)
|
|
514
|
{
|
|
515
|
gameover_timer++;
|
|
516
|
obj_mike_minigame_bg.image_blend = merge_colour(c_black, c_red, clamp(sin(current_time / 200) * 0.5, 0, 0.5));
|
|
517
|
if ((current_time >> 7) & 1)
|
|
518
|
obj_mike_controller.vis = false;
|
|
519
|
else
|
|
520
|
obj_mike_controller.vis = true;
|
|
521
|
if (gameover_timer > 30)
|
|
522
|
{
|
|
523
|
game_over = true;
|
|
524
|
obj_mike_minigame_bg.image_blend = c_black;
|
|
525
|
obj_mike_controller.vis = true;
|
|
526
|
}
|
|
527
|
}
|
|
528
|
else
|
|
529
|
{
|
|
530
|
obj_mike_minigame_bg.image_blend = c_black;
|
|
531
|
obj_mike_controller.vis = true;
|
|
532
|
gameover_timer = 0;
|
|
533
|
}
|
|
534
|
if (game_over)
|
|
535
|
{
|
|
536
|
with (obj_cavern_wall)
|
|
537
|
instance_destroy();
|
|
538
|
with (obj_green_cat)
|
|
539
|
{
|
|
540
|
scr_sparklescr_sparkle
function scr_sparkle(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_pos(arg0, arg1, arg2)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(arg1 + lengthdir_x(16, dir + ((i / num) * 360)), arg2 + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_colour(arg0, arg1)
{
var num = arg0;
dir = 0;
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 5, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
_ob.image_blend = arg1;
}
}
function scr_sparkle_random(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
with (instance_create_depth(x + lengthdir_x(16, (i / num) * 360), y + lengthdir_y(16, (i / num) * 360), depth - 1, obj_heart_sparkle))
motion_set(other.dir, irandom_range(4, 6));
dir += irandom(30);
}
} (8);
|
|
541
|
instance_destroy();
|
|
542
|
}
|
|
543
|
with (obj_blue_cat)
|
|
544
|
{
|
|
545
|
scr_sparklescr_sparkle
function scr_sparkle(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_pos(arg0, arg1, arg2)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(arg1 + lengthdir_x(16, dir + ((i / num) * 360)), arg2 + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_colour(arg0, arg1)
{
var num = arg0;
dir = 0;
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 5, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
_ob.image_blend = arg1;
}
}
function scr_sparkle_random(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
with (instance_create_depth(x + lengthdir_x(16, (i / num) * 360), y + lengthdir_y(16, (i / num) * 360), depth - 1, obj_heart_sparkle))
motion_set(other.dir, irandom_range(4, 6));
dir += irandom(30);
}
} (8);
|
|
546
|
instance_destroy();
|
|
547
|
}
|
|
548
|
with (obj_gold_cat)
|
|
549
|
{
|
|
550
|
scr_sparklescr_sparkle
function scr_sparkle(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_pos(arg0, arg1, arg2)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(arg1 + lengthdir_x(16, dir + ((i / num) * 360)), arg2 + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_colour(arg0, arg1)
{
var num = arg0;
dir = 0;
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 5, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
_ob.image_blend = arg1;
}
}
function scr_sparkle_random(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
with (instance_create_depth(x + lengthdir_x(16, (i / num) * 360), y + lengthdir_y(16, (i / num) * 360), depth - 1, obj_heart_sparkle))
motion_set(other.dir, irandom_range(4, 6));
dir += irandom(30);
}
} (8);
|
|
551
|
instance_destroy();
|
|
552
|
}
|
|
553
|
with (obj_meteor)
|
|
554
|
{
|
|
555
|
scr_sparklescr_sparkle
function scr_sparkle(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_pos(arg0, arg1, arg2)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(arg1 + lengthdir_x(16, dir + ((i / num) * 360)), arg2 + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_colour(arg0, arg1)
{
var num = arg0;
dir = 0;
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 5, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
_ob.image_blend = arg1;
}
}
function scr_sparkle_random(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
with (instance_create_depth(x + lengthdir_x(16, (i / num) * 360), y + lengthdir_y(16, (i / num) * 360), depth - 1, obj_heart_sparkle))
motion_set(other.dir, irandom_range(4, 6));
dir += irandom(30);
}
} (8);
|
|
556
|
instance_destroy();
|
|
557
|
}
|
|
558
|
with (obj_gold_cat_aura)
|
|
559
|
instance_destroy();
|
|
560
|
with (obj_mike_controller)
|
|
561
|
hand_type = 0;
|
|
562
|
mus_volume(global.batmusic[1], 0.5, 10);
|
|
563
|
with (obj_mike_minigame_tv)
|
|
564
|
{
|
|
565
|
latestscore[minigame] = other.myscore;
|
|
566
|
if (other.myscore > hiscore[minigame])
|
|
567
|
{
|
|
568
|
hiscore[minigame] = other.myscore;
|
|
569
|
global.flag[1698] = other.myscore;
|
|
570
|
snd_play(snd_won);
|
|
571
|
other.new_hiscore = 120;
|
|
572
|
}
|
|
573
|
else
|
|
574
|
{
|
|
575
|
snd_play(snd_coin);
|
|
576
|
}
|
|
577
|
}
|
|
578
|
myscore = 0;
|
|
579
|
timer = 0;
|
|
580
|
phase = 3;
|
|
581
|
}
|
|
582
|
}
|
|
583
|
if (action == 4)
|
|
584
|
{
|
|
585
|
var _width = 32 + (obj_mike_controller.line_width / 2);
|
|
586
|
timer++;
|
|
587
|
if (wave == 0 && timer == 30)
|
|
588
|
{
|
|
589
|
with (obj_mike_controller)
|
|
590
|
type = 4;
|
|
591
|
sound_play(snd_power);
|
|
592
|
score_next = 30;
|
|
593
|
wave = 1;
|
|
594
|
timer = 2000;
|
|
595
|
if (!i_ex(obj_volumebar))
|
|
596
|
instance_create_depth(0, 0, depth + 1, obj_volumebar);
|
|
597
|
if (!i_ex(obj_juggle_collision))
|
|
598
|
instance_create_depth(0, 0, depth - 1, obj_juggle_collision);
|
|
599
|
}
|
|
600
|
if (wave < 2)
|
|
601
|
{
|
|
602
|
with (obj_mike_controller)
|
|
603
|
{
|
|
604
|
line_ypos = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (line_ypos, 96, 4);
|
|
605
|
y = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (y, 240 + line_ypos, 4);
|
|
606
|
hand_distance = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (hand_distance, 80, 4);
|
|
607
|
line_width = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (line_width, 120 + min(other.difficulty * 40, 120), 2);
|
|
608
|
}
|
|
609
|
}
|
|
610
|
if (wave == 1)
|
|
611
|
{
|
|
612
|
if (timer > (280 - min(difficulty * 40, 180)))
|
|
613
|
{
|
|
614
|
timer = 0;
|
|
615
|
if (instance_number(obj_mike_ball) < min(3 + (difficulty * 2), 9))
|
|
616
|
{
|
|
617
|
instance_create_depth((room_width / 2) + (_width * ball_side), -32, depth - 1, obj_mike_ball);
|
|
618
|
ball_side = -ball_side;
|
|
619
|
}
|
|
620
|
else
|
|
621
|
{
|
|
622
|
wave = 2;
|
|
623
|
bubble_count = 0;
|
|
624
|
timer = bubble_timer;
|
|
625
|
bubble_num = irandom_range(3, min(3 + difficulty, 9));
|
|
626
|
}
|
|
627
|
}
|
|
628
|
}
|
|
629
|
if (wave == 2)
|
|
630
|
{
|
|
631
|
if (timer > bubble_timer && bubble_count <= bubble_num)
|
|
632
|
{
|
|
633
|
timer = 0;
|
|
634
|
bubble_count++;
|
|
635
|
bubble_timer = irandom_range(100, 200) - min(60, difficulty * 20);
|
|
636
|
instance_create_depth((room_width / 2) + irandom_range(-160, 160), -32, depth - 2, obj_mike_bubble);
|
|
637
|
}
|
|
638
|
if (myscore >= score_next && bubble_count > bubble_num)
|
|
639
|
{
|
|
640
|
var _onscreen = 0;
|
|
641
|
with (obj_mike_bubble)
|
|
642
|
{
|
|
643
|
if (y > 150)
|
|
644
|
_onscreen++;
|
|
645
|
}
|
|
646
|
with (obj_mike_ball)
|
|
647
|
{
|
|
648
|
if (wobble > 12 && _onscreen == instance_number(obj_mike_bubble))
|
|
649
|
act = 2;
|
|
650
|
}
|
|
651
|
if ((instance_number(obj_mike_ball) - instance_number(obj_mike_bubble)) == 0)
|
|
652
|
{
|
|
653
|
wave = 3;
|
|
654
|
timer = 150;
|
|
655
|
}
|
|
656
|
}
|
|
657
|
}
|
|
658
|
if (wave == 3)
|
|
659
|
{
|
|
660
|
if (timer > 150 && instance_number(obj_mike_bubble) == 0)
|
|
661
|
{
|
|
662
|
timer = 0;
|
|
663
|
difficulty++;
|
|
664
|
snd_play(snd_lancerlaugh);
|
|
665
|
var _l = instance_create_depth(room_width / 2, -64, depth - 1, obj_mike_lancer);
|
|
666
|
_l.max_hits = irandom_range(4, min(10, 5 + difficulty));
|
|
667
|
ball_side = -ball_side;
|
|
668
|
wave = 4;
|
|
669
|
}
|
|
670
|
}
|
|
671
|
if (wave == 4)
|
|
672
|
{
|
|
673
|
if (instance_number(obj_mike_lancer) == 0)
|
|
674
|
{
|
|
675
|
wave = 1;
|
|
676
|
timer = 200;
|
|
677
|
score_next = score + (irandom_range(25, 35) * 100);
|
|
678
|
}
|
|
679
|
}
|
|
680
|
if (game_over)
|
|
681
|
{
|
|
682
|
mus_volume(global.batmusic[1], 0.5, 10);
|
|
683
|
with (obj_mike_minigame_tv)
|
|
684
|
{
|
|
685
|
latestscore[minigame] = other.myscore;
|
|
686
|
if (other.myscore > hiscore[minigame])
|
|
687
|
{
|
|
688
|
hiscore[minigame] = other.myscore;
|
|
689
|
global.flag[1699] = other.myscore;
|
|
690
|
snd_play(snd_won);
|
|
691
|
other.new_hiscore = 120;
|
|
692
|
}
|
|
693
|
}
|
|
694
|
myscore = 0;
|
|
695
|
timer = 0;
|
|
696
|
phase = 3;
|
|
697
|
with (obj_mike_ball)
|
|
698
|
{
|
|
699
|
scr_sparklescr_sparkle
function scr_sparkle(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_pos(arg0, arg1, arg2)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(arg1 + lengthdir_x(16, dir + ((i / num) * 360)), arg2 + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_colour(arg0, arg1)
{
var num = arg0;
dir = 0;
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 5, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
_ob.image_blend = arg1;
}
}
function scr_sparkle_random(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
with (instance_create_depth(x + lengthdir_x(16, (i / num) * 360), y + lengthdir_y(16, (i / num) * 360), depth - 1, obj_heart_sparkle))
motion_set(other.dir, irandom_range(4, 6));
dir += irandom(30);
}
} (8);
|
|
700
|
instance_destroy();
|
|
701
|
}
|
|
702
|
with (obj_mike_cat)
|
|
703
|
{
|
|
704
|
scr_sparklescr_sparkle
function scr_sparkle(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_pos(arg0, arg1, arg2)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(arg1 + lengthdir_x(16, dir + ((i / num) * 360)), arg2 + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
}
}
function scr_sparkle_colour(arg0, arg1)
{
var num = arg0;
dir = 0;
for (i = 0; i < num; i++)
{
var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 5, obj_heart_sparkle);
_ob.speed = 4;
_ob.direction = (i / num) * 360;
_ob.image_blend = arg1;
}
}
function scr_sparkle_random(arg0)
{
var num = arg0;
dir = irandom(360);
for (i = 0; i < num; i++)
{
with (instance_create_depth(x + lengthdir_x(16, (i / num) * 360), y + lengthdir_y(16, (i / num) * 360), depth - 1, obj_heart_sparkle))
motion_set(other.dir, irandom_range(4, 6));
dir += irandom(30);
}
} (8);
|
|
705
|
instance_destroy();
|
|
706
|
}
|
|
707
|
}
|
|
708
|
}
|
|
709
|
if (action == 5)
|
|
710
|
{
|
|
711
|
timer++;
|
|
712
|
score_timer++;
|
|
713
|
if (score_timer >= 30)
|
|
714
|
{
|
|
715
|
score_timer = 0;
|
|
716
|
myscore += 1;
|
|
717
|
}
|
|
718
|
if (wave == 0 && timer == 15)
|
|
719
|
{
|
|
720
|
wave_reset();
|
|
721
|
sign_side = 1;
|
|
722
|
with (obj_mike_controller)
|
|
723
|
{
|
|
724
|
type = 1;
|
|
725
|
last_type = 1;
|
|
726
|
}
|
|
727
|
if (!i_ex(obj_volumebar))
|
|
728
|
instance_create_depth(0, 0, depth + 1, obj_volumebar);
|
|
729
|
}
|
|
730
|
with (obj_mike_controller)
|
|
731
|
x = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (x, 180, 12);
|
|
732
|
if (timer > wave_timer)
|
|
733
|
{
|
|
734
|
wave++;
|
|
735
|
timer = 0;
|
|
736
|
switch (wave)
|
|
737
|
{
|
|
738
|
case 1:
|
|
739
|
case 2:
|
|
740
|
case 3:
|
|
741
|
case 4:
|
|
742
|
case 5:
|
|
743
|
case 6:
|
|
744
|
case 7:
|
|
745
|
case 8:
|
|
746
|
wave_timer -= 2;
|
|
747
|
break;
|
|
748
|
case 60:
|
|
749
|
case 70:
|
|
750
|
case 80:
|
|
751
|
case 90:
|
|
752
|
wave_timer -= 5;
|
|
753
|
break;
|
|
754
|
case 9:
|
|
755
|
timer = -30;
|
|
756
|
wave_timer -= 2;
|
|
757
|
break;
|
|
758
|
case 10:
|
|
759
|
wave_min = 40;
|
|
760
|
wave_max = 70;
|
|
761
|
wave_double = true;
|
|
762
|
wave_dist_min = 3;
|
|
763
|
wave_dist_max = 3;
|
|
764
|
wave_timer = 40;
|
|
765
|
break;
|
|
766
|
case 20:
|
|
767
|
wave_min = 30;
|
|
768
|
wave_max = 100;
|
|
769
|
wave_dist_min = 2;
|
|
770
|
wave_dist_max = 2;
|
|
771
|
break;
|
|
772
|
case 30:
|
|
773
|
wave_min = 25;
|
|
774
|
wave_max = 125;
|
|
775
|
wave_dist_min = 1.75;
|
|
776
|
wave_dist_max = 2;
|
|
777
|
break;
|
|
778
|
case 40:
|
|
779
|
wave_min = 25;
|
|
780
|
wave_max = 140;
|
|
781
|
wave_dist_min = 1.5;
|
|
782
|
wave_dist_max = 1.75;
|
|
783
|
break;
|
|
784
|
case 50:
|
|
785
|
wave_min = 20;
|
|
786
|
wave_max = 150;
|
|
787
|
wave_dist_min = 1;
|
|
788
|
wave_dist_max = 2;
|
|
789
|
break;
|
|
790
|
case 24:
|
|
791
|
case 34:
|
|
792
|
case 44:
|
|
793
|
case 54:
|
|
794
|
case 64:
|
|
795
|
case 74:
|
|
796
|
case 84:
|
|
797
|
case 94:
|
|
798
|
timer = -15;
|
|
799
|
break;
|
|
800
|
case 25:
|
|
801
|
case 35:
|
|
802
|
case 45:
|
|
803
|
case 55:
|
|
804
|
case 65:
|
|
805
|
case 75:
|
|
806
|
case 85:
|
|
807
|
case 95:
|
|
808
|
applause_speed += 1;
|
|
809
|
break;
|
|
810
|
case 999:
|
|
811
|
wave_min = 80;
|
|
812
|
wave_max = 120;
|
|
813
|
wave_timer = 30;
|
|
814
|
applause_speed = 10;
|
|
815
|
break;
|
|
816
|
case 100:
|
|
817
|
wave_ang = 15;
|
|
818
|
wave_min = 90;
|
|
819
|
break;
|
|
820
|
}
|
|
821
|
if (myscore > 1000 && myscore > (last_score + 900) && irandom(min(myscore, 100) > 10))
|
|
822
|
{
|
|
823
|
last_score = myscore;
|
|
824
|
}
|
|
825
|
else
|
|
826
|
{
|
|
827
|
var ob = instance_create_depth(camerax() + camerawidth() + 50, cameray() + 170 + (wave_y * sign_side), depth, obj_mike_pipe);
|
|
828
|
ob.hspeed = -applause_speed;
|
|
829
|
ob.scale = irandom_range(wave_min, wave_max);
|
|
830
|
ob.angle = -wave_ang * random_range(0.5, 1);
|
|
831
|
ob.wait = 5;
|
|
832
|
if (wave_double && choose(1, 1, 0))
|
|
833
|
{
|
|
834
|
sign_side = -sign_side;
|
|
835
|
var ob2 = instance_create_depth(camerax() + camerawidth() + 50, cameray() + 170 + (wave_y * sign_side), depth, obj_mike_pipe);
|
|
836
|
ob2.hspeed = -applause_speed;
|
|
837
|
ob2.angle = -wave_ang * random_range(0.5, 1);
|
|
838
|
ob2.scale = max(40, 170 - (ob.scale * random_range(wave_dist_min, wave_dist_max)));
|
|
839
|
ob2.wait = 5;
|
|
840
|
}
|
|
841
|
if (choose(0, 1) || !wave_double)
|
|
842
|
sign_side = -sign_side;
|
|
843
|
}
|
|
844
|
}
|
|
845
|
if (hurt)
|
|
846
|
{
|
|
847
|
hurt = false;
|
|
848
|
life -= 1;
|
|
849
|
timer = wave_timer - 10;
|
|
850
|
with (obj_mike_pipe)
|
|
851
|
{
|
|
852
|
scr_sparkle_pos(8, x, y + lengthdir_x(scale + 15, image_angle + 180));
|
|
853
|
instance_destroy();
|
|
854
|
}
|
|
855
|
if (life <= 0)
|
|
856
|
game_over = true;
|
|
857
|
}
|
|
858
|
if (game_over)
|
|
859
|
{
|
|
860
|
mus_volume(global.batmusic[1], 0.5, 10);
|
|
861
|
with (obj_mike_minigame_tv)
|
|
862
|
{
|
|
863
|
latestscore[minigame] = other.myscore;
|
|
864
|
if (other.myscore > hiscore[minigame])
|
|
865
|
{
|
|
866
|
hiscore[minigame] = other.myscore;
|
|
867
|
global.flag[1698] = other.myscore;
|
|
868
|
snd_play(snd_won);
|
|
869
|
other.new_hiscore = 120;
|
|
870
|
}
|
|
871
|
}
|
|
872
|
myscore = 0;
|
|
873
|
wave = 0;
|
|
874
|
timer = 0;
|
|
875
|
phase = 3;
|
|
876
|
with (obj_volumebar)
|
|
877
|
instance_destroy();
|
|
878
|
with (obj_mike_pipe)
|
|
879
|
{
|
|
880
|
scr_sparkle_pos(8, x, y + lengthdir_x(scale + 15, image_angle + 180));
|
|
881
|
instance_destroy();
|
|
882
|
}
|
|
883
|
}
|
|
884
|
}
|
|
885
|
}
|
|
886
|
if (phase == 3)
|
|
887
|
{
|
|
888
|
with (obj_mike_battle)
|
|
889
|
act = 0;
|
|
890
|
with (obj_mike_controller)
|
|
891
|
type = 0;
|
|
892
|
hold_quit_timer = 0;
|
|
893
|
game_over = false;
|
|
894
|
plueyhealth = 3;
|
|
895
|
phase = 0;
|
|
896
|
talking = false;
|
|
897
|
canclick = true;
|
|
898
|
with (obj_darkener)
|
|
899
|
darken = 0;
|
|
900
|
with (obj_mike_controller)
|
|
901
|
type = 5;
|
|
902
|
with (obj_mike_battle)
|
|
903
|
move = false;
|
|
904
|
with (obj_herokris)
|
|
905
|
idlesprite = spr_kris_dance;
|
|
906
|
with (obj_herosusie)
|
|
907
|
idlesprite = spr_susie_dance;
|
|
908
|
with (obj_heroralsei)
|
|
909
|
idlesprite = spr_ralsei_dance;
|
|
910
|
battle_text();
|
|
911
|
}
|
|
912
|
if (!game_over && phase == 2)
|
|
913
|
{
|
|
914
|
if (button3_h())
|
|
915
|
hold_quit_timer = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (hold_quit_timer, 30, 1);
|
|
916
|
else
|
|
917
|
hold_quit_timer = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (hold_quit_timer, 0, 1);
|
|
918
|
if (hold_quit_timer == 30)
|
|
919
|
{
|
|
920
|
game_over = true;
|
|
921
|
hold_quit_timer = 0;
|
|
922
|
plueyhealth = 0;
|
|
923
|
if (action != 3)
|
|
924
|
wave = 0;
|
|
925
|
if (action == 1)
|
|
926
|
{
|
|
927
|
event_user(11);
|
|
928
|
}
|
|
929
|
else
|
|
930
|
{
|
|
931
|
with (obj_mike_minigame_tv)
|
|
932
|
{
|
|
933
|
latestscore[minigame] = other.myscore;
|
|
934
|
if (other.myscore > hiscore[minigame])
|
|
935
|
{
|
|
936
|
hiscore[minigame] = other.myscore;
|
|
937
|
if (other.action == 3)
|
|
938
|
global.flag[1698] = other.myscore;
|
|
939
|
else
|
|
940
|
global.flag[1699] = other.myscore;
|
|
941
|
snd_play(snd_won);
|
|
942
|
other.new_hiscore = 120;
|
|
943
|
}
|
|
944
|
else if (other.action != 3)
|
|
945
|
{
|
|
946
|
snd_play(snd_coin);
|
|
947
|
}
|
|
948
|
}
|
|
949
|
}
|
|
950
|
}
|
|
951
|
}
|