1 |
var shake = false |
2 |
if (scene == 1) |
3 |
{ |
4 |
shake = true |
5 |
if (shake_int > 0) |
6 |
shake_int -= 0.2 |
7 |
else if (!alarm[1]) |
8 |
alarm[1] = 50alarm[1]scene = 2
if (global.route == 3)
audio_play_sound(mus_elevator_broken, 1, 0)
else
audio_play_sound(mus_elevator, 1, 0)
audio_play_sound(snd_rumble, 1, 1)
if (global.dunes_flag[4] < 3)
alarm[2] = 660
else
alarm[2] = 90 |
9 |
} |
10 |
if (scene == 2) |
11 |
{ |
12 |
if (irandom(60) == 1) |
13 |
{ |
14 |
darkness_alpha = 0.15 |
15 |
audio_play_sound(snd_electric_flash, 1, 0) |
16 |
} |
17 |
else |
18 |
darkness_alpha = 0 |
19 |
shake_int = 1 |
20 |
shake = true |
21 |
} |
22 |
if (scene == 3) |
23 |
{ |
24 |
shake = true |
25 |
if (shake_int > 0) |
26 |
shake_int -= 0.2 |
27 |
else if (!alarm[3]) |
28 |
alarm[3] = 50alarm[3]trn = instance_create(x, y, obj_transition)
if (last_room == "rm_dunes_13")
{
trn.newRoom = 94
trn.xx = 100
trn.yy = 200
}
else
{
trn.newRoom = 92
trn.xx = 420
trn.yy = 180
} |
29 |
} |
30 |
if shake |
31 |
{ |
32 |
__view_set((0 << 0), 0, 0) |
33 |
__view_set((1 << 0), 0, 0) |
34 |
__view_set((0 << 0), 0, ((__view_get((0 << 0), 0)) + (random_range((-shake_int), shake_int)))) |
35 |
__view_set((1 << 0), 0, ((__view_get((1 << 0), 0)) + (random_range(((-shake_int) * 0.75), (shake_int * 0.75))))) |
36 |
} |