1 |
if (active == false) |
2 |
return; |
3 |
var play_machine_sound = false |
4 |
if global.up_key |
5 |
{ |
6 |
if (phy_position_y > (y_original_phy - 10)) |
7 |
{ |
8 |
phy_position_y -= 1.2 |
9 |
play_machine_sound = true |
10 |
} |
11 |
} |
12 |
if global.down_key |
13 |
{ |
14 |
if (phy_position_y < (y_original_phy + 10)) |
15 |
{ |
16 |
phy_position_y += 1.2 |
17 |
play_machine_sound = true |
18 |
} |
19 |
} |
20 |
if play_machine_sound |
21 |
{ |
22 |
if (!audio_is_playing(snd_puzzle_woodmove)) |
23 |
audio_play_sound(snd_puzzle_woodmove, 1, 1) |
24 |
} |
25 |
else |
26 |
audio_stop_sound(snd_puzzle_woodmove) |