| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
var battle_box = 3154; |
| 4 |
if (image_alpha < 1) |
| 5 |
{ |
| 6 |
image_alpha += 0.1; |
| 7 |
} |
| 8 |
else if (noloop == false) |
| 9 |
{ |
| 10 |
var base_speed = 12; |
| 11 |
switch (gravity_direction) |
| 12 |
{ |
| 13 |
case 0: |
| 14 |
hspeed = -base_speed; |
| 15 |
vspeed = 2; |
| 16 |
if (y > battle_box.y) |
| 17 |
vspeed *= -1; |
| 18 |
break; |
| 19 |
case 180: |
| 20 |
hspeed = base_speed; |
| 21 |
vspeed = 2; |
| 22 |
if (y > battle_box.y) |
| 23 |
vspeed *= -1; |
| 24 |
break; |
| 25 |
case 90: |
| 26 |
vspeed = base_speed; |
| 27 |
hspeed = 2; |
| 28 |
if (x > battle_box.x) |
| 29 |
hspeed *= -1; |
| 30 |
break; |
| 31 |
case 270: |
| 32 |
vspeed = -base_speed; |
| 33 |
hspeed = 2; |
| 34 |
if (x > battle_box.x) |
| 35 |
hspeed *= -1; |
| 36 |
break; |
| 37 |
} |
| 38 |
gravity = 0.4; |
| 39 |
noloop = true; |
| 40 |
} |
| 41 |
var hurt_player = false; |
| 42 |
if (noloop == true) |
| 43 |
{ |
| 44 |
if (place_meeting(x, y, obj_battle_enemy_attack_axis_shield)) |
| 45 |
{ |
| 46 |
if (instance_exists(obj_battlebox_controller_axis)) |
| 47 |
obj_battlebox_controller_axis.axis_trash_meter = clamp(obj_battlebox_controller_axis.axis_trash_meter + 10, 0, 100); |
| 48 |
obj_battle_enemy_attack_axis_shield.shield_hit = true; |
| 49 |
var shield = 511; |
| 50 |
direction = other.direction; |
| 51 |
bomb_speed = 15; |
| 52 |
destroy_check = true; |
| 53 |
} |
| 54 |
if (collision_rectangle(battle_box.x - 5, battle_box.y - 5, battle_box.x + 5, battle_box.y + 5, id, false, false)) |
| 55 |
hurt_player = true; |
| 56 |
} |
| 57 |
if (hurt_player) |
| 58 |
{ |
| 59 |
instance_destroy(self, false); |
| 60 |
instance_create_depth(320, 320, -100, obj_battle_enemy_attack_axis_energy_ball_explosion); |
| 61 |
} |
| 62 |
if (destroy_check == true && bomb_speed > 0) |
| 63 |
instance_destroy(); |