1 |
cancollide = 0; |
2 |
if (global.interact == 0 || collide == 1) |
3 |
cancollide = 1; |
4 |
if (cancollide == 1) |
5 |
{ |
6 |
if (abovey == 0) |
7 |
{ |
8 |
if (obj_mainchara.y < y) |
9 |
{ |
10 |
abovey = 1; |
11 |
snd_play(snd_noise); |
12 |
slide_noise = snd_loop(snd_paper_surf); |
13 |
with (obj_mainchara) |
14 |
{ |
15 |
fun = 1; |
16 |
sprite_index = spr_krisd_slide; |
17 |
} |
18 |
} |
19 |
if (obj_mainchara.y > y) |
20 |
abovey = -1; |
21 |
} |
22 |
collide = 1; |
23 |
global.interact = 1; |
24 |
other.y += 12; |
25 |
collidetimer = 3; |
26 |
collider += 1; |
27 |
if (slidetimer == 0 && abovey == 1) |
28 |
{ |
29 |
dust = instance_create(obj_mainchara.x + 20, obj_mainchara.y + 30, obj_slidedust); |
30 |
with (dust) |
31 |
{ |
32 |
vspeed = -6; |
33 |
hspeed = -1 + random(2); |
34 |
} |
35 |
slidetimer = -6; |
36 |
} |
37 |
slidetimer += 1; |
38 |
if (move_lr_enabled && obj_mainchara.px == 0) |
39 |
{ |
40 |
if (left_h()) |
41 |
{ |
42 |
with (obj_mainchara) |
43 |
{ |
44 |
_px = -6; |
45 |
if (!place_meeting(x + _px, y, obj_solidblock)) |
46 |
x += _px; |
47 |
} |
48 |
} |
49 |
if (right_h()) |
50 |
{ |
51 |
with (obj_mainchara) |
52 |
{ |
53 |
_px = 6; |
54 |
if (!place_meeting(x + _px, y, obj_solidblock)) |
55 |
x += _px; |
56 |
} |
57 |
} |
58 |
} |
59 |
} |