1 |
function scr_enemy_attack_insomnitot_sheep_starsscr_enemy_attack_insomnitot_sheep_starsfunction scr_enemy_attack_insomnitot_sheep_stars() //gml_Script_scr_enemy_attack_insomnitot_sheep_stars
{
var distance_factor = 24
var random_direction = irandom_range(0, 1)
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)
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)
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_stars |
2 |
{ |
3 |
var distance_factor = 24 |
4 |
var random_direction = irandom_range(0, 1) |
5 |
if (random_direction == 0) |
6 |
{ |
7 |
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) |
8 |
for (i = 0; i <= 5; i += 1) |
9 |
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) |
10 |
with (obj_battle_enemy_attack_insomnitot_fence) |
11 |
attack_direction = 1 |
12 |
with (obj_battle_enemy_attack_insomnitot_sheep) |
13 |
attack_direction = -1 |
14 |
} |
15 |
else if (random_direction == 1) |
16 |
{ |
17 |
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) |
18 |
for (i = 0; i <= 5; i += 1) |
19 |
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) |
20 |
with (obj_battle_enemy_attack_insomnitot_fence) |
21 |
attack_direction = -1 |
22 |
with (obj_battle_enemy_attack_insomnitot_sheep) |
23 |
attack_direction = 1 |
24 |
} |
25 |
} |