1 |
function scr_enemy_attack_insomnitot_sheepscr_enemy_attack_insomnitot_sheepfunction scr_enemy_attack_insomnitot_sheep() //gml_Script_scr_enemy_attack_insomnitot_sheep
{
var distance_factor = 24
var random_direction = irandom_range(0, 1)
var random_spawn = irandom_range(0, 4)
if (random_direction == 0)
{
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - 70), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 5), obj_battle_enemy_attack_insomnitot_fence)
for (i = 0; i <= 5; i += 1)
{
if (i != random_spawn && (i - 1) != random_spawn)
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + 10 + distance_factor * i), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 5), obj_battle_enemy_attack_insomnitot_sheep)
}
with (obj_battle_enemy_attack_insomnitot_fence)
attack_direction = 1
with (obj_battle_enemy_attack_insomnitot_sheep)
attack_direction = -1
}
else if (random_direction == 1)
{
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + 70), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 5), obj_battle_enemy_attack_insomnitot_fence)
for (i = 0; i <= 5; i += 1)
{
if (i != random_spawn && (i - 1) != random_spawn)
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - 10 - distance_factor * i), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 5), obj_battle_enemy_attack_insomnitot_sheep)
}
with (obj_battle_enemy_attack_insomnitot_fence)
attack_direction = -1
with (obj_battle_enemy_attack_insomnitot_sheep)
attack_direction = 1
}
} () //gml_Script_scr_enemy_attack_insomnitot_sheep |
2 |
{ |
3 |
var distance_factor = 24 |
4 |
var random_direction = irandom_range(0, 1) |
5 |
var random_spawn = irandom_range(0, 4) |
6 |
if (random_direction == 0) |
7 |
{ |
8 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - 70), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 5), obj_battle_enemy_attack_insomnitot_fence) |
9 |
for (i = 0; i <= 5; i += 1) |
10 |
{ |
11 |
if (i != random_spawn && (i - 1) != random_spawn) |
12 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + 10 + distance_factor * i), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 5), obj_battle_enemy_attack_insomnitot_sheep) |
13 |
} |
14 |
with (obj_battle_enemy_attack_insomnitot_fence) |
15 |
attack_direction = 1 |
16 |
with (obj_battle_enemy_attack_insomnitot_sheep) |
17 |
attack_direction = -1 |
18 |
} |
19 |
else if (random_direction == 1) |
20 |
{ |
21 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + 70), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 5), obj_battle_enemy_attack_insomnitot_fence) |
22 |
for (i = 0; i <= 5; i += 1) |
23 |
{ |
24 |
if (i != random_spawn && (i - 1) != random_spawn) |
25 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - 10 - distance_factor * i), (obj_dialogue_box_battle_transformation_any.bbox_bottom - 5), obj_battle_enemy_attack_insomnitot_sheep) |
26 |
} |
27 |
with (obj_battle_enemy_attack_insomnitot_fence) |
28 |
attack_direction = -1 |
29 |
with (obj_battle_enemy_attack_insomnitot_sheep) |
30 |
attack_direction = 1 |
31 |
} |
32 |
} |