1 |
if live_call() |
2 |
return global.live_result; |
3 |
if (fade_out == true) |
4 |
{ |
5 |
if (draw_alpha > 0.01) |
6 |
draw_alpha = lerp(draw_alpha, 0, 0.1) |
7 |
else |
8 |
instance_destroy() |
9 |
return; |
10 |
} |
11 |
if (draw_alpha < 0.99) |
12 |
draw_alpha = lerp(draw_alpha, 1, 0.1) |
13 |
else if (puzzle_draw_guide == true) |
14 |
{ |
15 |
if (keyboard_multicheck_pressed(0) || keyboard_multicheck_pressed(1)) |
16 |
puzzle_draw_guide = false |
17 |
return; |
18 |
} |
19 |
else if (puzzle_start_noloop == false) |
20 |
{ |
21 |
alarm[0] = 15alarm[0]if live_call()
return global.live_result;
countdown_current -= 1
if (countdown_current > 0)
{
audio_play_sound(snd_chem_countdown, 1, 0)
alarm[0] = 30
}
else
{
if (puzzle_music == snd_ceroba_staff_lock)
{
puzzle_music = audio_play_sound(mus_mixin_it_up, 1, 1)
audio_sound_pitch(puzzle_music, 1)
if (global.route == 3)
{
alarm[4] = irandom_range(60, 120)
audio_sound_pitch(puzzle_music, random_range(0.75, 1.25))
}
}
audio_play_sound(snd_chem_go, 1, 0)
draw_puzzle_layer = true
alarm[1] = 30
} |
22 |
draw_alpha = 1 |
23 |
puzzle_start_noloop = true |
24 |
} |
25 |
if (puzzle_game_victory == true) |
26 |
{ |
27 |
if (!alarm[2]) |
28 |
alarm[2] = 45 |
29 |
puzzle_alpha = 0.5 |
30 |
return; |
31 |
} |
32 |
if (puzzle_game_over == true) |
33 |
{ |
34 |
event_user(0) |
35 |
offset_max = 3 |
36 |
puzzle_alpha = 0.5 |
37 |
puzzle_game_over = false |
38 |
screenshake_enabled = true |
39 |
} |
40 |
if (global.route == 3) |
41 |
{ |
42 |
if (instance_exists(obj_chem_05_maze_puzzle_player) && obj_chem_05_maze_puzzle_player.can_move) |
43 |
{ |
44 |
if (puzzle_speed_last == 0) |
45 |
puzzle_speed_last = obj_chem_05_maze_puzzle_player.max_speed |
46 |
if (!alarm[5]) |
47 |
{ |
48 |
if (irandom(pseudo_random_number) == 1) |
49 |
{ |
50 |
pseudo_random_number = pseudo_random_number_max |
51 |
puzzle_alpha = random_range(0.25, 0.5) |
52 |
audio_play_sound(snd_electric_flash, 1, 0, 1, 0, random_range(0.75, 1.25)) |
53 |
alarm[5] = irandom_range(15, 25)alarm[5]if (instance_exists(obj_chem_05_maze_puzzle_player) && obj_chem_05_maze_puzzle_player.can_move)
puzzle_alpha = 0 |
54 |
} |
55 |
else if (pseudo_random_number > 20) |
56 |
pseudo_random_number-- |
57 |
} |
58 |
} |
59 |
} |
60 |
if (screenshake_enabled == true) |
61 |
{ |
62 |
x_offset = random_range((-offset_max), offset_max) |
63 |
y_offset = random_range((-offset_max), offset_max) |
64 |
if (offset_max > 0) |
65 |
offset_max -= 0.2 |
66 |
else |
67 |
screenshake_enabled = 0 |
68 |
} |