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