| 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 |
exit; |
| 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(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 |
{ |
| 37 |
mT -= 1; |
| 38 |
} |
| 39 |
else if (mT == 0) |
| 40 |
{ |
| 41 |
mT = -1; |
| 42 |
MSG_ADVANCE = true; |
| 43 |
} |
| 44 |
} |
| 45 |
script_execute(scr_text_counter_overworld); |
| 46 |
script_execute(scr_text_choices); |
| 47 |
if (MSG_ADVANCE || force_skip) |
| 48 |
{ |
| 49 |
if ((message_current + 1) < array_length_1d(message)) |
| 50 |
{ |
| 51 |
message_current += 1; |
| 52 |
cutoff = 0; |
| 53 |
} |
| 54 |
else |
| 55 |
{ |
| 56 |
global.dialogue_open = false; |
| 57 |
} |
| 58 |
force_skip = false; |
| 59 |
} |