1 |
scr_depthscr_depthdepth = 50000 - ((y * 10) + (sprite_height * 10)); (); |
2 |
if (global.interact != 5) |
3 |
vspeed = 8; |
4 |
else |
5 |
vspeed = 0; |
6 |
if (y > topy) |
7 |
{ |
8 |
if (speeded == 0) |
9 |
{ |
10 |
phase = 0; |
11 |
speeded = 1; |
12 |
} |
13 |
if (global.interact != 5) |
14 |
vspeed = 4; |
15 |
} |
16 |
if (active == 1 && global.interact != 5) |
17 |
{ |
18 |
if (instance_exists(obj_waterpushrockgen)) |
19 |
{ |
20 |
if (obj_waterpushrockgen.colliding == 0) |
21 |
{ |
22 |
if (collision_rectangle(bbox_left, bbox_bottom + 1, bbox_right, bbox_bottom + vspeed + 1, obj_mainchara, 0, 1)) |
23 |
{ |
24 |
obj_mainchara.y += vspeed; |
25 |
if (obj_time.up) |
26 |
obj_mainchara.y += 3; |
27 |
if (obj_time.down && vspeed > 3) |
28 |
obj_mainchara.y -= 3; |
29 |
obj_mainchara.x = round(obj_mainchara.x); |
30 |
obj_mainchara.y = round(obj_mainchara.y); |
31 |
obj_waterpushrockgen.colliding = 1; |
32 |
} |
33 |
} |
34 |
} |
35 |
} |
36 |
if (y > bottomy) |
37 |
{ |
38 |
d = instance_create(x, y, obj_waterpushrock_2); |
39 |
if (room == room_water7) |
40 |
d.alarm[0] = 2; |
41 |
instance_destroy(); |
42 |
} |
43 |
if (y > 350) |
44 |
instance_destroy(); |