1 |
var note_hit = false |
2 |
if instance_exists(obj_sme_yellow_rhythm_note) |
3 |
{ |
4 |
var y_restore = y |
5 |
i = (-hit_extend_neg) |
6 |
while (i <= hit_extend_pos) |
7 |
{ |
8 |
y = y_restore - i |
9 |
var instance = instance_place(x, y, obj_sme_yellow_rhythm_note) |
10 |
if (instance != noone) |
11 |
{ |
12 |
note_hit = true |
13 |
break |
14 |
} |
15 |
else if (grace_period_current > 0) |
16 |
{ |
17 |
instance = instance_place(pos_x_previous_selection, y, obj_sme_yellow_rhythm_note) |
18 |
if (instance != noone) |
19 |
{ |
20 |
note_hit = true |
21 |
break |
22 |
} |
23 |
else |
24 |
{ |
25 |
i++ |
26 |
continue |
27 |
} |
28 |
} |
29 |
else |
30 |
{ |
31 |
i++ |
32 |
continue |
33 |
} |
34 |
} |
35 |
y = y_restore |
36 |
} |
37 |
if (note_hit == true) |
38 |
{ |
39 |
with (instance) |
40 |
{ |
41 |
if (note_sound != snd_ceroba_staff_lock) |
42 |
audio_play_sound(note_sound, 20, false) |
43 |
global.id_store = id |
44 |
instance_create(x, y, obj_sme_yellow_rhythm_note_end) |
45 |
instance_destroy() |
46 |
} |
47 |
instance_create(x, (bbox_top - 1), obj_sme_yellow_rhythm_hit) |
48 |
} |
49 |
else |
50 |
instance_create(damage_pos_x, damage_pos_y, obj_sme_yellow_rhythm_damage) |