1 |
if (obj_heart_battle_fighting_parent.moveable == true && no_loop == false) |
2 |
{ |
3 |
script_execute(scr_battle_core_directory_enemy_attack_alarms); |
4 |
no_loop = true; |
5 |
} |
6 |
if (battle_box_resize_midfight == true) |
7 |
{ |
8 |
image_xscale = lerp(image_xscale, battle_box_target_xscale, 0.15); |
9 |
image_yscale = lerp(image_yscale, battle_box_target_yscale, 0.15); |
10 |
x = lerp(x, battle_box_target_x, 0.15); |
11 |
y = lerp(y, battle_box_target_y, 0.15); |
12 |
if (abs(image_xscale - battle_box_target_xscale) < 0.01 && abs(image_yscale - battle_box_target_yscale) < 0.01 && abs(x - battle_box_target_x) < 0.1 && abs(y - battle_box_target_y) < 0.1) |
13 |
{ |
14 |
battle_box_resize_midfight = false; |
15 |
image_xscale = battle_box_target_xscale; |
16 |
image_yscale = battle_box_target_yscale; |
17 |
x = battle_box_target_x; |
18 |
y = battle_box_target_y; |
19 |
} |
20 |
if (instance_exists(obj_heart_battle_fighting_parent)) |
21 |
{ |
22 |
with (obj_heart_battle_fighting_parent) |
23 |
{ |
24 |
x = clamp(x, obj_dialogue_box_battle_transformation_any.bbox_left + 10, obj_dialogue_box_battle_transformation_any.bbox_right - 10); |
25 |
y = clamp(y, obj_dialogue_box_battle_transformation_any.bbox_top + 10, obj_dialogue_box_battle_transformation_any.bbox_bottom - 10); |
26 |
} |
27 |
} |
28 |
} |
29 |
if (sc_able == true) |
30 |
{ |
31 |
if (sc_direction == "In") |
32 |
{ |
33 |
sc_dcurrent += sc_speed; |
34 |
if (sc_dcurrent >= 1) |
35 |
{ |
36 |
sc_dcurrent = 1; |
37 |
sc_direction = "None"; |
38 |
script_execute(sc_in_script); |
39 |
} |
40 |
} |
41 |
else if (sc_direction == "Out") |
42 |
{ |
43 |
sc_dcurrent -= sc_speed; |
44 |
if (sc_dcurrent <= 0) |
45 |
{ |
46 |
sc_dcurrent = 0; |
47 |
sc_direction = "None"; |
48 |
script_execute(sc_out_script); |
49 |
} |
50 |
} |
51 |
} |