1 |
image_angle = pspeed[1] * 2; |
2 |
pspeed[0] = hspeed; |
3 |
for (i = 4; i > 0; i -= 1) |
4 |
pspeed[i] = pspeed[i - 1]; |
5 |
if (collision_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, obj_heartshot, 0, 1) && tang == 1) |
6 |
{ |
7 |
if (instance_exists(obj_mettatonb_second)) |
8 |
{ |
9 |
snd_play(snd_damage); |
10 |
jimbo = collision_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, obj_heartshot, 0, 1); |
11 |
with (jimbo) |
12 |
instance_destroy(); |
13 |
hit += 1; |
14 |
if (hit < 8) |
15 |
alarm[5] = 60; |
16 |
if (shudderon == 0) |
17 |
shudderon = 1; |
18 |
shudder = 10; |
19 |
} |
20 |
if (instance_exists(obj_mettatonb_third)) |
21 |
{ |
22 |
if (hitted == 0) |
23 |
{ |
24 |
hitted = 1; |
25 |
alarm[3] = 30; |
26 |
global.turntimer = 50; |
27 |
} |
28 |
snd_play(snd_bell); |
29 |
jimbo = collision_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, obj_heartshot, 0, 1); |
30 |
gi = instance_create(jimbo.x, jimbo.y, obj_heartshot_bounceaway); |
31 |
gi.image_yscale = jimbo.image_yscale; |
32 |
with (jimbo) |
33 |
instance_destroy(); |
34 |
} |
35 |
} |
36 |
if (shudderon == 1) |
37 |
{ |
38 |
if (sha == 0) |
39 |
sha = x; |
40 |
x = sha + shudder; |
41 |
if (shudder < 0) |
42 |
shudder = -(shudder + 1); |
43 |
else |
44 |
shudder = -shudder; |
45 |
if (shudder == 0) |
46 |
{ |
47 |
sha = 0; |
48 |
shudderon = 0; |
49 |
} |
50 |
} |