1 |
script_execute(gml_Script_scr_controls_text) |
2 |
var message_adv = false |
3 |
if (egg_eat == true) |
4 |
{ |
5 |
if instance_exists(obj_sousborg_perfectly_edible_egg) |
6 |
{ |
7 |
with (obj_sousborg_perfectly_edible_egg) |
8 |
{ |
9 |
var target_y = obj_sousborg_body_a.y - 85 |
10 |
image_angle += 15 |
11 |
image_xscale = (abs(y - target_y)) / (abs(ystart - target_y)) |
12 |
image_yscale = image_xscale |
13 |
if (abs(y - target_y) > 0.1) |
14 |
{ |
15 |
y = lerp(y, target_y, 0.15) |
16 |
return; |
17 |
} |
18 |
else |
19 |
{ |
20 |
message_adv = true |
21 |
instance_destroy(obj_sousborg_perfectly_edible_egg) |
22 |
} |
23 |
} |
24 |
} |
25 |
} |
26 |
if key_revert_pressed |
27 |
{ |
28 |
characters = message_length |
29 |
message_draw = string_copy(message[message_current], 0, characters) |
30 |
if (color_count >= 1) |
31 |
message_draw_2 = string_copy(message_2[message_current], 0, characters) |
32 |
} |
33 |
if (characters < message_length) |
34 |
{ |
35 |
if (counter == 0) |
36 |
{ |
37 |
if (color_count >= 1) |
38 |
{ |
39 |
script_execute(gml_Script_scr_text_increase_color) |
40 |
script_execute(gml_Script_scr_talking_enemy_color) |
41 |
} |
42 |
else |
43 |
{ |
44 |
script_execute(gml_Script_scr_text_increase) |
45 |
script_execute(gml_Script_scr_talking_enemy) |
46 |
} |
47 |
} |
48 |
else |
49 |
can_talk = false |
50 |
} |
51 |
else |
52 |
{ |
53 |
can_talk = false |
54 |
if key_select_pressed |
55 |
{ |
56 |
if (message_current == 1) |
57 |
egg_eat = true |
58 |
else if (message_current < message_end) |
59 |
message_adv = true |
60 |
else |
61 |
{ |
62 |
instance_activate_object(obj_heart_battle_menu_act) |
63 |
with (obj_quote_bubble_battle) |
64 |
instance_destroy() |
65 |
global.enemy_sparing = true |
66 |
instance_destroy() |
67 |
instance_destroy(obj_battle_enemy_attack_sousborg_season_generator) |
68 |
} |
69 |
} |
70 |
} |
71 |
if (message_adv == true) |
72 |
{ |
73 |
message_current += 1 |
74 |
message_length = string_length(message[message_current]) |
75 |
characters = 0 |
76 |
message_draw = "" |
77 |
if (color_count >= 1) |
78 |
message_draw_2 = "" |
79 |
} |
80 |
if (color_count >= 1) |
81 |
script_execute(gml_Script_scr_text_counter_color) |
82 |
else |
83 |
script_execute(gml_Script_scr_text_counter) |