1 |
function scr_enemy_attack_candy_cornscr_enemy_attack_candy_cornfunction scr_enemy_attack_candy_corn() //gml_Script_scr_enemy_attack_candy_corn
{
var distance_x = 20
var distance_y = 26
var max_variations = 3
global.attack_counter_max = 25
if (global.attack_counter == 0 && global.timer_attacks_counter < 6)
{
if (global.timer_attacks_counter == 0)
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance_x), (obj_dialogue_box_battle_transformation_any.bbox_top + distance_y), obj_battle_enemy_attack_candy_corn)
else if (global.timer_attacks_counter == 1)
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance_x), round(obj_dialogue_box_battle_transformation_any.bbox_top + (obj_dialogue_box_battle_transformation_any.bbox_bottom - obj_dialogue_box_battle_transformation_any.bbox_top) / 2), obj_battle_enemy_attack_candy_corn)
else if (global.timer_attacks_counter == 2)
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance_x), (obj_dialogue_box_battle_transformation_any.bbox_bottom - distance_y), obj_battle_enemy_attack_candy_corn)
else if (global.timer_attacks_counter == 3)
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance_x), (obj_dialogue_box_battle_transformation_any.bbox_top + distance_y), obj_battle_enemy_attack_candy_corn)
else if (global.timer_attacks_counter == 4)
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance_x), round(obj_dialogue_box_battle_transformation_any.bbox_top + (obj_dialogue_box_battle_transformation_any.bbox_bottom - obj_dialogue_box_battle_transformation_any.bbox_top) / 2), obj_battle_enemy_attack_candy_corn)
else if (global.timer_attacks_counter == 5)
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance_x), (obj_dialogue_box_battle_transformation_any.bbox_bottom - distance_y), obj_battle_enemy_attack_candy_corn)
global.timer_attacks_counter += 1
}
} () //gml_Script_scr_enemy_attack_candy_corn |
2 |
{ |
3 |
var distance_x = 20 |
4 |
var distance_y = 26 |
5 |
var max_variations = 3 |
6 |
global.attack_counter_max = 25 |
7 |
if (global.attack_counter == 0 && global.timer_attacks_counter < 6) |
8 |
{ |
9 |
if (global.timer_attacks_counter == 0) |
10 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance_x), (obj_dialogue_box_battle_transformation_any.bbox_top + distance_y), obj_battle_enemy_attack_candy_corn) |
11 |
else if (global.timer_attacks_counter == 1) |
12 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance_x), round(obj_dialogue_box_battle_transformation_any.bbox_top + (obj_dialogue_box_battle_transformation_any.bbox_bottom - obj_dialogue_box_battle_transformation_any.bbox_top) / 2), obj_battle_enemy_attack_candy_corn) |
13 |
else if (global.timer_attacks_counter == 2) |
14 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_left - distance_x), (obj_dialogue_box_battle_transformation_any.bbox_bottom - distance_y), obj_battle_enemy_attack_candy_corn) |
15 |
else if (global.timer_attacks_counter == 3) |
16 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance_x), (obj_dialogue_box_battle_transformation_any.bbox_top + distance_y), obj_battle_enemy_attack_candy_corn) |
17 |
else if (global.timer_attacks_counter == 4) |
18 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance_x), round(obj_dialogue_box_battle_transformation_any.bbox_top + (obj_dialogue_box_battle_transformation_any.bbox_bottom - obj_dialogue_box_battle_transformation_any.bbox_top) / 2), obj_battle_enemy_attack_candy_corn) |
19 |
else if (global.timer_attacks_counter == 5) |
20 |
instance_create((obj_dialogue_box_battle_transformation_any.bbox_right + distance_x), (obj_dialogue_box_battle_transformation_any.bbox_bottom - distance_y), obj_battle_enemy_attack_candy_corn) |
21 |
global.timer_attacks_counter += 1 |
22 |
} |
23 |
} |