1 | function scr_text_counter_overworld |
2 | { |
3 | var current_char = string_char_at(message[message_current], cutoff); |
4 | var counter_max = 1; |
5 | var message_length = string_length(message[message_current]); |
6 | var pause_duration = 5; |
7 | if (cutoff > 0 && cutoff < message_length) |
8 | { |
9 | switch (current_char) |
10 | { |
11 | case ".": |
12 | case ",": |
13 | case "?": |
14 | case "!": |
15 | counter_max = pause_duration; |
16 | break; |
17 | default: |
18 | counter_max = 1; |
19 | } |
20 | counter += 1; |
21 | if (counter >= counter_max) |
22 | counter = 0; |
23 | } |
24 | else |
25 | { |
26 | counter = 0; |
27 | } |
28 | } |