1 |
if (global.dialogue_open == false) |
2 |
{ |
3 |
image_alpha -= 0.1 |
4 |
if (image_alpha <= 0) |
5 |
instance_destroy() |
6 |
} |
7 |
var MSG_ADVANCE = false |
8 |
var message_length = string_length(message[message_current]) |
9 |
if (message_reset == true) |
10 |
{ |
11 |
message_reset = false |
12 |
message = 0 |
13 |
event_perform(ev_create, 0) |
14 |
return; |
15 |
} |
16 |
if (keyboard_multicheck_pressed(1) && skippable == true) |
17 |
cutoff = message_length |
18 |
if (cutoff < message_length) |
19 |
{ |
20 |
if (counter == 0) |
21 |
{ |
22 |
cutoff += 1 |
23 |
script_execute(gml_Script_scr_text_talk) |
24 |
} |
25 |
} |
26 |
else if (keyboard_multicheck_pressed(0) && skippable == true) |
27 |
{ |
28 |
if (choice == false) |
29 |
MSG_ADVANCE = true |
30 |
} |
31 |
if (message_timer > -1 && cutoff == message_length) |
32 |
{ |
33 |
if (mT == -1) |
34 |
mT = message_timer |
35 |
if (mT > 0) |
36 |
mT -= 1 |
37 |
else if (mT == 0) |
38 |
{ |
39 |
mT = -1 |
40 |
MSG_ADVANCE = true |
41 |
} |
42 |
} |
43 |
script_execute(gml_Script_scr_text_counter_overworld) |
44 |
script_execute(gml_Script_scr_text_choices) |
45 |
if (MSG_ADVANCE || force_skip) |
46 |
{ |
47 |
if ((message_current + 1) < array_length_1d(message)) |
48 |
{ |
49 |
message_current += 1 |
50 |
cutoff = 0 |
51 |
} |
52 |
else |
53 |
global.dialogue_open = false |
54 |
force_skip = false |
55 |
} |