1 |
function scr_enemy_attack_flier_swarmscr_enemy_attack_flier_swarmfunction scr_enemy_attack_flier_swarm() //gml_Script_scr_enemy_attack_flier_swarm
{
global.attack_counter_max = 30
if (global.attack_counter == 0)
{
var distance_x = 13
var distance_y = 11
var random_number_x = irandom_range((obj_dialogue_box_battle_transformation_any.bbox_left + 13), (obj_dialogue_box_battle_transformation_any.bbox_right - 13))
var random_number_y = irandom_range((obj_dialogue_box_battle_transformation_any.bbox_top + 11), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 11))
var sector = irandom_range(0, 1)
var sector_2 = irandom_range(0, 1)
if (sector == 0)
{
if (sector_2 == 0)
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance_x), random_number_y, obj_battle_enemy_attack_flier_swarm_horizontal)
else if (sector_2 == 1)
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance_x), random_number_y, obj_battle_enemy_attack_flier_swarm_horizontal)
}
else if (sector == 1)
{
if (sector_2 == 0)
instance_create(random_number_x, (obj_dialogue_box_battle_transformation_any.bbox_top - distance_y), obj_battle_enemy_attack_flier_swarm_vertical)
else if (sector_2 == 1)
instance_create(random_number_x, (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance_y), obj_battle_enemy_attack_flier_swarm_vertical)
}
}
} () //gml_Script_scr_enemy_attack_flier_swarm |
2 |
{ |
3 |
global.attack_counter_max = 30 |
4 |
if (global.attack_counter == 0) |
5 |
{ |
6 |
var distance_x = 13 |
7 |
var distance_y = 11 |
8 |
var random_number_x = irandom_range((obj_dialogue_box_battle_transformation_any.bbox_left + 13), (obj_dialogue_box_battle_transformation_any.bbox_right - 13)) |
9 |
var random_number_y = irandom_range((obj_dialogue_box_battle_transformation_any.bbox_top + 11), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 11)) |
10 |
var sector = irandom_range(0, 1) |
11 |
var sector_2 = irandom_range(0, 1) |
12 |
if (sector == 0) |
13 |
{ |
14 |
if (sector_2 == 0) |
15 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance_x), random_number_y, obj_battle_enemy_attack_flier_swarm_horizontal) |
16 |
else if (sector_2 == 1) |
17 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance_x), random_number_y, obj_battle_enemy_attack_flier_swarm_horizontal) |
18 |
} |
19 |
else if (sector == 1) |
20 |
{ |
21 |
if (sector_2 == 0) |
22 |
instance_create(random_number_x, (obj_dialogue_box_battle_transformation_any.bbox_top - distance_y), obj_battle_enemy_attack_flier_swarm_vertical) |
23 |
else if (sector_2 == 1) |
24 |
instance_create(random_number_x, (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance_y), obj_battle_enemy_attack_flier_swarm_vertical) |
25 |
} |
26 |
} |
27 |
} |