1 |
if (collision_rectangle(x + 10, bbox_top - 2, x + 10, bbox_bottom - 2, obj_mainchara, 0, 1) && touched == 0) |
2 |
{ |
3 |
touched = 1; |
4 |
if (image_index == 1) |
5 |
{ |
6 |
snd_play(snd_instanoise); |
7 |
image_index = 2; |
8 |
obj_xoxocontroller1.fvic = 0; |
9 |
} |
10 |
if (image_index == 0) |
11 |
{ |
12 |
image_index = 1; |
13 |
snd_play(snd_instanoise); |
14 |
} |
15 |
} |
16 |
if (collision_rectangle(x + 10, bbox_top - 2, x + 10, bbox_bottom - 2, obj_mainchara, 0, 1) < 0 && touched == 1) |
17 |
touched = 0; |
18 |
if (instance_exists(obj_xoxocontroller1)) |
19 |
{ |
20 |
if (image_index == 1) |
21 |
obj_xoxocontroller1.vic += 1; |
22 |
} |