1 |
script_execute(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 = 2147; |
12 |
var bubble_x = 402; |
13 |
var bubble_y = 68; |
14 |
switch (enemy_talker[message_current]) |
15 |
{ |
16 |
case 0: |
17 |
bubble_type = 2147; |
18 |
bubble_x = 402; |
19 |
bubble_y = 68; |
20 |
break; |
21 |
case 1: |
22 |
bubble_type = 96; |
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 = 96; |
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 |
if (!instance_exists(bubble_type) || bubble_type.x != bubble_x) |
33 |
{ |
34 |
with (obj_quote_bubble_battle) |
35 |
instance_destroy(); |
36 |
instance_create(bubble_x, bubble_y, bubble_type); |
37 |
} |
38 |
} |
39 |
switch (global.turns_passed) |
40 |
{ |
41 |
case 10: |
42 |
script_execute(scr_cutscene_battle_guardener_2); |
43 |
break; |
44 |
} |
45 |
if (key_revert_pressed) |
46 |
{ |
47 |
characters = message_length; |
48 |
message_draw = string_copy(message[message_current], 0, characters); |
49 |
} |
50 |
if (characters < message_length) |
51 |
{ |
52 |
if (counter == 0) |
53 |
{ |
54 |
script_execute(scr_text_increase); |
55 |
if (enemy_talker != 0) |
56 |
{ |
57 |
switch (enemy_talker[message_current]) |
58 |
{ |
59 |
case 0: |
60 |
script_execute(scr_talking_guardener); |
61 |
break; |
62 |
case 1: |
63 |
case 2: |
64 |
script_execute(scr_talking_enemy); |
65 |
break; |
66 |
} |
67 |
} |
68 |
else |
69 |
{ |
70 |
script_execute(scr_talking_guardener); |
71 |
} |
72 |
} |
73 |
else |
74 |
{ |
75 |
can_talk = false; |
76 |
} |
77 |
} |
78 |
else |
79 |
{ |
80 |
can_talk = false; |
81 |
if (key_select_pressed && skippable == true) |
82 |
{ |
83 |
if (message_current < message_end) |
84 |
{ |
85 |
message_adv = true; |
86 |
} |
87 |
else |
88 |
{ |
89 |
with (obj_dialogue_box_battle_transformation_any) |
90 |
event_user(0); |
91 |
with (obj_quote_bubble_battle) |
92 |
instance_destroy(); |
93 |
instance_destroy(); |
94 |
} |
95 |
} |
96 |
} |
97 |
if (message_adv == true) |
98 |
{ |
99 |
message_current += 1; |
100 |
message_length = string_length(message[message_current]); |
101 |
characters = 0; |
102 |
message_draw = ""; |
103 |
draw_enabled = true; |
104 |
message_adv = false; |
105 |
} |
106 |
script_execute(scr_text_counter); |