Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_text_counter_overworld

(view raw script w/o annotations or w/e)
1
function scr_text_counter_overworld
scr_text_counter_overworld

function scr_text_counter_overworld() //gml_Script_scr_text_counter_overworld { var current_char = string_char_at(message[message_current], cutoff) var counter_max = 1 var message_length = string_length(message[message_current]) var pause_duration = 5 if (cutoff > 0 && cutoff < message_length) { switch current_char { case ".": case ",": case "?": case "!": counter_max = pause_duration break default: counter_max = 1 } counter += 1 if (counter >= counter_max) counter = 0 } else counter = 0 }
() //gml_Script_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
21
        counter += 1
22
        if (counter >= counter_max)
23
            counter = 0
24
    }
25
    else
26
        counter = 0
27
}