1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
if (global.dialogue_open == false) |
4 |
{ |
5 |
if (draw_alpha > 0) |
6 |
draw_alpha -= 0.03; |
7 |
else |
8 |
instance_destroy(); |
9 |
exit; |
10 |
} |
11 |
var MSG_ADVANCE = false; |
12 |
var message_length = string_length(message[message_current]); |
13 |
if (message_reset == true) |
14 |
{ |
15 |
message_reset = false; |
16 |
message = 0; |
17 |
event_perform(ev_create, 0); |
18 |
exit; |
19 |
} |
20 |
if (keyboard_multicheck_pressed(1) && skippable == true) |
21 |
cutoff = message_length; |
22 |
if (cutoff < message_length) |
23 |
{ |
24 |
if (counter == 0) |
25 |
{ |
26 |
cutoff += 0.5; |
27 |
script_execute(scr_text_talk); |
28 |
} |
29 |
} |
30 |
else if (keyboard_multicheck_pressed(0) && skippable == true) |
31 |
{ |
32 |
if (choice == false) |
33 |
MSG_ADVANCE = true; |
34 |
} |
35 |
if (message_timer > -1 && cutoff == message_length) |
36 |
{ |
37 |
if (mT == -1) |
38 |
mT = message_timer; |
39 |
if (mT > 0) |
40 |
{ |
41 |
mT -= 1; |
42 |
} |
43 |
else if (mT == 0) |
44 |
{ |
45 |
mT = -1; |
46 |
fade_out = true; |
47 |
} |
48 |
} |
49 |
script_execute(scr_text_counter_overworld); |
50 |
script_execute(scr_text_choices); |
51 |
if (fade_out == true) |
52 |
{ |
53 |
if (draw_alpha > 0) |
54 |
{ |
55 |
draw_alpha -= 0.03; |
56 |
} |
57 |
else |
58 |
{ |
59 |
fade_out = false; |
60 |
MSG_ADVANCE = true; |
61 |
} |
62 |
} |
63 |
if (MSG_ADVANCE || force_skip) |
64 |
{ |
65 |
if ((message_current + 1) < array_length_1d(message)) |
66 |
{ |
67 |
message_current += 1; |
68 |
cutoff = 0; |
69 |
draw_alpha = 1; |
70 |
} |
71 |
else |
72 |
{ |
73 |
global.dialogue_open = false; |
74 |
} |
75 |
force_skip = false; |
76 |
} |