1 |
function scr_start_enemy_attacking_sweet_corn_penilla_duoscr_start_enemy_attacking_sweet_corn_penilla_duofunction scr_start_enemy_attacking_sweet_corn_penilla_duo() //gml_Script_scr_start_enemy_attacking_sweet_corn_penilla_duo
{
instance_create(319, 320, obj_dialogue_box_battle_transformation_any)
var battle_menu_number = global.battle_menu_number
var fight_number = global.fight_number
var act_number = global.act_number
var enemy_dead = global.enemy_dead
var enemy_dead_2 = global.enemy_dead_2
var enemy_spared = global.enemy_spared
var enemy_spared_2 = global.enemy_spared_2
end_loop = false
if (battle_menu_number == 1)
{
if (fight_number == 1)
{
if (enemy_dead == false && enemy_spared == false)
{
instance_create(218, 128, obj_quote_bubble_battle_yellow)
instance_create(0, 0, obj_quote_battle_sweet_corn_a)
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red)
}
else if (enemy_dead_2 == false && enemy_spared_2 == false)
{
instance_create(422, 132, obj_quote_bubble_battle_yellow_2)
instance_create(0, 0, obj_quote_battle_penilla_b)
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red)
}
}
else if (fight_number == 2)
{
if (enemy_dead_2 == false && enemy_spared_2 == false)
{
instance_create(422, 132, obj_quote_bubble_battle_yellow_2)
instance_create(0, 0, obj_quote_battle_penilla_b)
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red)
}
else if (enemy_dead == false && enemy_spared == false)
{
instance_create(218, 128, obj_quote_bubble_battle_yellow)
instance_create(0, 0, obj_quote_battle_sweet_corn_a)
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red)
}
}
}
else if (battle_menu_number == 2)
{
if (act_number == 1)
{
instance_create(218, 128, obj_quote_bubble_battle_yellow)
instance_create(0, 0, obj_quote_battle_sweet_corn_a)
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red)
}
else if (act_number == 2)
{
instance_create(422, 132, obj_quote_bubble_battle_yellow_2)
instance_create(0, 0, obj_quote_battle_penilla_b)
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red)
}
}
else
{
var random_number = irandom_range(1, 2)
while (end_loop == false)
{
if (random_number == 1 && enemy_dead == false && enemy_spared == false)
{
instance_create(218, 128, obj_quote_bubble_battle_yellow)
instance_create(0, 0, obj_quote_battle_sweet_corn_a)
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red)
end_loop = true
break
}
else if (random_number == 2 && enemy_dead_2 == false && enemy_spared_2 == false)
{
instance_create(422, 132, obj_quote_bubble_battle_yellow_2)
instance_create(0, 0, obj_quote_battle_penilla_b)
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red)
end_loop = true
break
}
else
{
if (random_number == 1)
random_number = 2
else
random_number = 1
continue
}
}
}
} () //gml_Script_scr_start_enemy_attacking_sweet_corn_penilla_duo |
2 |
{ |
3 |
instance_create(319, 320, obj_dialogue_box_battle_transformation_any) |
4 |
var battle_menu_number = global.battle_menu_number |
5 |
var fight_number = global.fight_number |
6 |
var act_number = global.act_number |
7 |
var enemy_dead = global.enemy_dead |
8 |
var enemy_dead_2 = global.enemy_dead_2 |
9 |
var enemy_spared = global.enemy_spared |
10 |
var enemy_spared_2 = global.enemy_spared_2 |
11 |
end_loop = false |
12 |
if (battle_menu_number == 1) |
13 |
{ |
14 |
if (fight_number == 1) |
15 |
{ |
16 |
if (enemy_dead == false && enemy_spared == false) |
17 |
{ |
18 |
instance_create(218, 128, obj_quote_bubble_battle_yellow) |
19 |
instance_create(0, 0, obj_quote_battle_sweet_corn_a) |
20 |
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red) |
21 |
} |
22 |
else if (enemy_dead_2 == false && enemy_spared_2 == false) |
23 |
{ |
24 |
instance_create(422, 132, obj_quote_bubble_battle_yellow_2) |
25 |
instance_create(0, 0, obj_quote_battle_penilla_b) |
26 |
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red) |
27 |
} |
28 |
} |
29 |
else if (fight_number == 2) |
30 |
{ |
31 |
if (enemy_dead_2 == false && enemy_spared_2 == false) |
32 |
{ |
33 |
instance_create(422, 132, obj_quote_bubble_battle_yellow_2) |
34 |
instance_create(0, 0, obj_quote_battle_penilla_b) |
35 |
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red) |
36 |
} |
37 |
else if (enemy_dead == false && enemy_spared == false) |
38 |
{ |
39 |
instance_create(218, 128, obj_quote_bubble_battle_yellow) |
40 |
instance_create(0, 0, obj_quote_battle_sweet_corn_a) |
41 |
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red) |
42 |
} |
43 |
} |
44 |
} |
45 |
else if (battle_menu_number == 2) |
46 |
{ |
47 |
if (act_number == 1) |
48 |
{ |
49 |
instance_create(218, 128, obj_quote_bubble_battle_yellow) |
50 |
instance_create(0, 0, obj_quote_battle_sweet_corn_a) |
51 |
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red) |
52 |
} |
53 |
else if (act_number == 2) |
54 |
{ |
55 |
instance_create(422, 132, obj_quote_bubble_battle_yellow_2) |
56 |
instance_create(0, 0, obj_quote_battle_penilla_b) |
57 |
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red) |
58 |
} |
59 |
} |
60 |
else |
61 |
{ |
62 |
var random_number = irandom_range(1, 2) |
63 |
while (end_loop == false) |
64 |
{ |
65 |
if (random_number == 1 && enemy_dead == false && enemy_spared == false) |
66 |
{ |
67 |
instance_create(218, 128, obj_quote_bubble_battle_yellow) |
68 |
instance_create(0, 0, obj_quote_battle_sweet_corn_a) |
69 |
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red) |
70 |
end_loop = true |
71 |
break |
72 |
} |
73 |
else if (random_number == 2 && enemy_dead_2 == false && enemy_spared_2 == false) |
74 |
{ |
75 |
instance_create(422, 132, obj_quote_bubble_battle_yellow_2) |
76 |
instance_create(0, 0, obj_quote_battle_penilla_b) |
77 |
instance_create(round(obj_dialogue_box_battle_transformation_any.bbox_left + (obj_dialogue_box_battle_transformation_any.bbox_right - obj_dialogue_box_battle_transformation_any.bbox_left) / 2), 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_heart_battle_fighting_red) |
78 |
end_loop = true |
79 |
break |
80 |
} |
81 |
else |
82 |
{ |
83 |
if (random_number == 1) |
84 |
random_number = 2 |
85 |
else |
86 |
random_number = 1 |
87 |
continue |
88 |
} |
89 |
} |
90 |
} |
91 |
} |