1 | if (place_meeting(x, y, blockparent) && pressed == 0) |
2 | { |
3 | obj_puzzle.buttons += 1 |
4 | pressed = 1 |
5 | if (!audio_is_playing(snd_switch)) |
6 | audio_play_sound(snd_switch, 1, 0) |
7 | } |
8 | else if ((!(place_meeting(x, y, blockparent))) && pressed == 1) |
9 | { |
10 | obj_puzzle.buttons -= 1 |
11 | pressed = 0 |
12 | if (!audio_is_playing(snd_switch)) |
13 | audio_play_sound(snd_switch, 1, 0) |
14 | } |