1 |
script_execute(gml_Script_scr_controls_text) |
2 |
if instance_exists(obj_quote_bubble_battle) |
3 |
{ |
4 |
if (draw_enabled == false) |
5 |
obj_quote_bubble_battle.visible = 0 |
6 |
else |
7 |
obj_quote_bubble_battle.visible = 1 |
8 |
} |
9 |
if is_array(enemy_talker) |
10 |
{ |
11 |
var bubble_type = obj_quote_bubble_battle_yellow_3 |
12 |
var bubble_x = 402 |
13 |
var bubble_y = 68 |
14 |
switch enemy_talker[message_current] |
15 |
{ |
16 |
case 0: |
17 |
bubble_type = obj_quote_bubble_battle_yellow_3 |
18 |
bubble_x = 402 |
19 |
bubble_y = 68 |
20 |
break |
21 |
case 1: |
22 |
bubble_type = obj_quote_bubble_battle_yellow_above_larger |
23 |
bubble_x = obj_guardener_guy_a.x - sprite_get_width(spr_quote_bubble_battle_yellow_above) * 0.5 - 8 |
24 |
bubble_y = obj_guardener_guy_a.bbox_top - sprite_get_height(spr_quote_bubble_battle_yellow_above) |
25 |
break |
26 |
case 2: |
27 |
bubble_type = obj_quote_bubble_battle_yellow_above_larger |
28 |
bubble_x = obj_guardener_guy_b.x - sprite_get_width(spr_quote_bubble_battle_yellow_above) * 0.5 - 8 |
29 |
bubble_y = obj_guardener_guy_b.bbox_top - sprite_get_height(spr_quote_bubble_battle_yellow_above) |
30 |
break |
31 |
} |
32 |
|
33 |
if ((!instance_exists(bubble_type)) || bubble_type.x != bubble_x) |
34 |
{ |
35 |
with (obj_quote_bubble_battle) |
36 |
instance_destroy() |
37 |
instance_create(bubble_x, bubble_y, bubble_type) |
38 |
} |
39 |
} |
40 |
switch global.turns_passed |
41 |
{ |
42 |
case 7: |
43 |
script_execute(gml_Script_scr_cutscene_battle_guardener_1) |
44 |
event_user(0) |
45 |
break |
46 |
case 11: |
47 |
script_execute(gml_Script_scr_cutscene_battle_guardener_2) |
48 |
break |
49 |
case 12: |
50 |
script_execute(gml_Script_scr_cutscene_battle_guardener_3) |
51 |
break |
52 |
case 13: |
53 |
obj_guardener_guy_a.sprite_index = spr_guardener_guy_a |
54 |
obj_guardener_guy_a.active = true |
55 |
obj_guardener_guy_b.active = true |
56 |
break |
57 |
} |
58 |
|
59 |
if key_revert_pressed |
60 |
{ |
61 |
characters = message_length |
62 |
message_draw = string_copy(message[message_current], 0, characters) |
63 |
} |
64 |
if (global.enemy_sparing && message_current >= 2) |
65 |
{ |
66 |
if (message_current == 2) |
67 |
{ |
68 |
obj_guardener_body.guardener_stop_animating = true |
69 |
obj_guardener_meter.curr_fill = 0 |
70 |
} |
71 |
voice_pitch = 0.5 |
72 |
} |
73 |
if (characters < message_length) |
74 |
{ |
75 |
if (counter == 0) |
76 |
{ |
77 |
script_execute(gml_Script_scr_text_increase) |
78 |
if (enemy_talker != 0) |
79 |
{ |
80 |
switch enemy_talker[message_current] |
81 |
{ |
82 |
case 0: |
83 |
script_execute(gml_Script_scr_talking_guardener, voice_pitch) |
84 |
break |
85 |
case 1: |
86 |
case 2: |
87 |
script_execute(gml_Script_scr_talking_enemy) |
88 |
break |
89 |
} |
90 |
|
91 |
} |
92 |
else |
93 |
script_execute(gml_Script_scr_talking_guardener, voice_pitch) |
94 |
} |
95 |
else |
96 |
can_talk = false |
97 |
} |
98 |
else |
99 |
{ |
100 |
can_talk = false |
101 |
if (key_select_pressed && skippable == true) |
102 |
{ |
103 |
if (message_current < message_end) |
104 |
message_adv = true |
105 |
else |
106 |
{ |
107 |
if (global.turns_passed == 10 && (!instance_exists(obj_guardener_meter))) |
108 |
{ |
109 |
global.action_2_selected_count = 0 |
110 |
instance_create_depth(-100, 197, 0, obj_guardener_meter) |
111 |
} |
112 |
if (global.route == 2 && global.turns_passed == 7) |
113 |
instance_create_depth(0, 0, -100, obj_steamworks_29_in_battle_cutscene_2) |
114 |
else if (global.route == 2 && global.enemy_sparing) |
115 |
instance_create_depth(0, 0, -100, obj_steamworks_29_in_battle_cutscene_4) |
116 |
else |
117 |
{ |
118 |
with (obj_heart_battle_fighting_parent) |
119 |
moveable = true |
120 |
} |
121 |
with (obj_quote_bubble_battle) |
122 |
instance_destroy() |
123 |
instance_destroy() |
124 |
} |
125 |
} |
126 |
} |
127 |
if (message_adv == true) |
128 |
{ |
129 |
message_current += 1 |
130 |
message_length = string_length(message[message_current]) |
131 |
characters = 0 |
132 |
message_draw = "" |
133 |
draw_enabled = true |
134 |
message_adv = false |
135 |
} |
136 |
script_execute(gml_Script_scr_text_counter) |