1 |
if (global.turntimer < 1) |
2 |
instance_destroy(); |
3 |
if (timer > 0) |
4 |
timer++; |
5 |
spawninvincibilitytimer++; |
6 |
if (timer == 6) |
7 |
{ |
8 |
snd_play(snd_bomb); |
9 |
snd_stop(bomsfallsfx); |
10 |
sprite_index = spr_mettaton_bomb2; |
11 |
image_index = 0; |
12 |
instance_create(x, y, obj_shake); |
13 |
hitbox1 = instance_create(x, y, obj_mettaton_bomb_hitbox); |
14 |
hitbox1.image_xscale = 5000; |
15 |
hitbox1.image_yscale = 0.5; |
16 |
hitbox1.creator = id; |
17 |
hitbox2 = instance_create(x, y, obj_mettaton_bomb_hitbox); |
18 |
hitbox2.image_xscale = 0.2; |
19 |
hitbox2.image_yscale = 5000; |
20 |
hitbox2.creator = id; |
21 |
} |
22 |
if (timer == 12) |
23 |
instance_destroy(); |
24 |
if (y > ((obj_growtangle.y - 81) + obj_growtangle.sprite_height)) |
25 |
{ |
26 |
if (alarm[0] < 1) |
27 |
{ |
28 |
snd_play(snd_bump); |
29 |
gravity = 0.24; |
30 |
vspeed = -5.5 - random(3); |
31 |
con = 2; |
32 |
alarm[0] = 10; |
33 |
} |
34 |
} |
35 |
if (x < (obj_growtangle.x + (obj_growtangle.sprite_width / 2) + 10) && y > ((obj_growtangle.y - (obj_growtangle.sprite_height / 2)) + 10)) |
36 |
{ |
37 |
if (timer == 0) |
38 |
{ |
39 |
snd_play(snd_damage); |
40 |
gravity = 0; |
41 |
speed = 0; |
42 |
timer = 1; |
43 |
image_speed = 1; |
44 |
bomsfallsfx = snd_loop(snd_bombfall); |
45 |
} |
46 |
} |