1 |
var tumbleweed_time0 = 46 |
2 |
var tumbleweed_time1 = 71 |
3 |
var tumbleweed_time2 = 136 |
4 |
var tumbleweed_time3 = 136 |
5 |
switch tumbleweed_spawn[0] |
6 |
{ |
7 |
case 45: |
8 |
instance_create(200, 50, obj_dunes_tumbleweed) |
9 |
break |
10 |
case 1: |
11 |
tumbleweed_spawn[0] = tumbleweed_time0 |
12 |
break |
13 |
} |
14 |
|
15 |
switch tumbleweed_spawn[1] |
16 |
{ |
17 |
case 70: |
18 |
case 55: |
19 |
instance_create(320, 50, obj_dunes_tumbleweed) |
20 |
break |
21 |
case 1: |
22 |
tumbleweed_spawn[1] = tumbleweed_time1 |
23 |
break |
24 |
} |
25 |
|
26 |
switch tumbleweed_spawn[2] |
27 |
{ |
28 |
case 135: |
29 |
case 120: |
30 |
case 108: |
31 |
case 60: |
32 |
case 45: |
33 |
instance_create(440, 50, obj_dunes_tumbleweed) |
34 |
break |
35 |
case 1: |
36 |
tumbleweed_spawn[2] = tumbleweed_time2 |
37 |
break |
38 |
} |
39 |
|
40 |
switch tumbleweed_spawn[3] |
41 |
{ |
42 |
case 135: |
43 |
case 120: |
44 |
case 105: |
45 |
case 70: |
46 |
case 55: |
47 |
case 40: |
48 |
case 15: |
49 |
instance_create(560, 50, obj_dunes_tumbleweed) |
50 |
break |
51 |
case 1: |
52 |
tumbleweed_spawn[3] = tumbleweed_time3 |
53 |
break |
54 |
} |
55 |
|
56 |
for (var i = 0; i <= 3; i++) |
57 |
{ |
58 |
if (tumbleweed_spawn[i] > 1) |
59 |
tumbleweed_spawn[i] -= 1 |
60 |
} |
61 |
if (obj_pl.y < 250 && (!player_knocked_out)) |
62 |
{ |
63 |
with (obj_dunes_tumbleweed) |
64 |
{ |
65 |
if place_meeting(x, y, obj_pl) |
66 |
{ |
67 |
scr_cutscene_startscr_cutscene_startfunction scr_cutscene_start() //gml_Script_scr_cutscene_start
{
global.cutscene = true
obj_pl.state = gml_Script_scr_frozen_state
obj_pl.image_index = 0
obj_pl.image_speed = 0
} () |
68 |
audio_play_sound(snd_monster_damage_hit, 1, 0) |
69 |
other.player_knocked_out = true |
70 |
} |
71 |
} |
72 |
} |
73 |
if player_knocked_out |
74 |
{ |
75 |
if (obj_pl.y < 290) |
76 |
{ |
77 |
with (obj_pl) |
78 |
{ |
79 |
y += 4 |
80 |
image_angle += 35 |
81 |
} |
82 |
} |
83 |
else |
84 |
{ |
85 |
player_knocked_out = false |
86 |
scr_cutscene_end() |
87 |
with (obj_pl) |
88 |
image_angle = 0 |
89 |
} |
90 |
} |
91 |
if (obj_pl.x < 680) |
92 |
{ |
93 |
if (!audio_is_playing(snd_rumble)) |
94 |
audio_play_sound(snd_rumble, 1, 0) |
95 |
} |
96 |
else if audio_is_playing(snd_rumble) |
97 |
scr_audio_fade_outscr_audio_fade_outfunction scr_audio_fade_out(argument0, argument1) //gml_Script_scr_audio_fade_out
{
var snd = argument0
var fade_len = argument1
if (!audio_is_playing(snd))
return false;
audio_sound_gain(snd, 0, fade_len)
if instance_exists(obj_audio_fade_helper)
{
with (obj_audio_fade_helper)
{
if (audio_to_fade == snd)
return false;
}
}
with (instance_create(0, 0, obj_audio_fade_helper))
audio_to_fade = snd
} (snd_rumble, 300) |