1 |
var battle_box = 3154; |
2 |
var current_side = choose("hor", "ver"); |
3 |
var spawn_x, spawn_y; |
4 |
if (current_side == "hor") |
5 |
{ |
6 |
spawn_x = choose(battle_box.bbox_left - 80, battle_box.bbox_right + 80); |
7 |
spawn_y = irandom_range(battle_box.bbox_top - 80, battle_box.bbox_bottom + 80); |
8 |
} |
9 |
else |
10 |
{ |
11 |
spawn_y = choose(battle_box.bbox_top - 80, battle_box.bbox_bottom + 80); |
12 |
spawn_x = irandom_range(battle_box.bbox_left - 80, battle_box.bbox_right + 80); |
13 |
} |
14 |
var ball = instance_create_depth(spawn_x, spawn_y, -100, obj_battle_enemy_attack_axis_energy_ball_boss); |
15 |
ball.direction = point_direction(ball.x, ball.y, battle_box.x, battle_box.y); |
16 |
ball.speed = 5; |
17 |
if (attack_count > 0) |
18 |
{ |
19 |
attack_count -= 1; |
20 |
alarm[0] = attack_interval;gml_Object_obj_battle_enemy_attack_energy_balls_spin_creator_Alarm_0.gmlvar battle_box = 3154;
var current_side = choose("hor", "ver");
var spawn_x, spawn_y;
if (current_side == "hor")
{
spawn_x = choose(battle_box.bbox_left - 80, battle_box.bbox_right + 80);
spawn_y = irandom_range(battle_box.bbox_top - 80, battle_box.bbox_bottom + 80);
}
else
{
spawn_y = choose(battle_box.bbox_top - 80, battle_box.bbox_bottom + 80);
spawn_x = irandom_range(battle_box.bbox_left - 80, battle_box.bbox_right + 80);
}
var ball = instance_create_depth(spawn_x, spawn_y, -100, obj_battle_enemy_attack_axis_energy_ball_boss);
ball.direction = point_direction(ball.x, ball.y, battle_box.x, battle_box.y);
ball.speed = 5;
if (attack_count > 0)
{
attack_count -= 1;
alarm[0] = attack_interval;
}
else
{
instance_destroy();
} |
21 |
} |
22 |
else |
23 |
{ |
24 |
instance_destroy(); |
25 |
} |