1 |
function scr_enemy_attack_flier_swarm_doublescr_enemy_attack_flier_swarm_doublefunction scr_enemy_attack_flier_swarm_double() //gml_Script_scr_enemy_attack_flier_swarm_double
{
global.attack_counter_max = 30
if (global.attack_counter == 0)
{
distance_x = 13
distance_y = 11
random_generator_1 = irandom_range(1, 4)
random_generator_2 = irandom_range(1, 3)
if (random_generator_2 >= random_generator_1)
random_generator_2 += 1
for (i = 1; i <= 2; i += 1)
{
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))
if (i == 1)
random_generator = random_generator_1
else if (i == 2)
random_generator = random_generator_2
if (random_generator == 1)
{
var sector = 0
var sector_2 = 0
}
else if (random_generator == 2)
{
sector = 0
sector_2 = 1
}
else if (random_generator == 3)
{
sector = 1
sector_2 = 0
}
else if (random_generator == 4)
{
sector = 1
sector_2 = 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_double |
2 |
{ |
3 |
global.attack_counter_max = 30 |
4 |
if (global.attack_counter == 0) |
5 |
{ |
6 |
distance_x = 13 |
7 |
distance_y = 11 |
8 |
random_generator_1 = irandom_range(1, 4) |
9 |
random_generator_2 = irandom_range(1, 3) |
10 |
if (random_generator_2 >= random_generator_1) |
11 |
random_generator_2 += 1 |
12 |
for (i = 1; i <= 2; i += 1) |
13 |
{ |
14 |
var random_number_x = irandom_range((obj_dialogue_box_battle_transformation_any.bbox_left + 13), (obj_dialogue_box_battle_transformation_any.bbox_right - 13)) |
15 |
var random_number_y = irandom_range((obj_dialogue_box_battle_transformation_any.bbox_top + 11), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 11)) |
16 |
if (i == 1) |
17 |
random_generator = random_generator_1 |
18 |
else if (i == 2) |
19 |
random_generator = random_generator_2 |
20 |
if (random_generator == 1) |
21 |
{ |
22 |
var sector = 0 |
23 |
var sector_2 = 0 |
24 |
} |
25 |
else if (random_generator == 2) |
26 |
{ |
27 |
sector = 0 |
28 |
sector_2 = 1 |
29 |
} |
30 |
else if (random_generator == 3) |
31 |
{ |
32 |
sector = 1 |
33 |
sector_2 = 0 |
34 |
} |
35 |
else if (random_generator == 4) |
36 |
{ |
37 |
sector = 1 |
38 |
sector_2 = 1 |
39 |
} |
40 |
if (sector == 0) |
41 |
{ |
42 |
if (sector_2 == 0) |
43 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance_x), random_number_y, obj_battle_enemy_attack_flier_swarm_horizontal) |
44 |
else if (sector_2 == 1) |
45 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance_x), random_number_y, obj_battle_enemy_attack_flier_swarm_horizontal) |
46 |
} |
47 |
else if (sector == 1) |
48 |
{ |
49 |
if (sector_2 == 0) |
50 |
instance_create(random_number_x, (obj_dialogue_box_battle_transformation_any.bbox_top - distance_y), obj_battle_enemy_attack_flier_swarm_vertical) |
51 |
else if (sector_2 == 1) |
52 |
instance_create(random_number_x, (obj_dialogue_box_battle_transformation_any.bbox_bottom + distance_y), obj_battle_enemy_attack_flier_swarm_vertical) |
53 |
} |
54 |
} |
55 |
} |
56 |
} |