Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_text_counter

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

function scr_text_counter() //gml_Script_scr_text_counter { if (characters > 0 && characters < message_length) { current_char = string_char_at(message_draw, characters) switch current_char { case ".": case ",": case "?": case "!": counter_max = global.text_counter_max break default: counter_max = 1 } if (hold > 1) counter_max = 1 counter += 1 if (counter >= counter_max) counter = 0 } else counter = 0 }
() //gml_Script_scr_text_counter
2
{
3
    if (characters > 0 && characters < message_length)
4
    {
5
        current_char = string_char_at(message_draw, characters)
6
        switch current_char
7
        {
8
            case ".":
9
            case ",":
10
            case "?":
11
            case "!":
12
                counter_max = global.text_counter_max
13
                break
14
            default:
15
                counter_max = 1
16
        }
17
18
        if (hold > 1)
19
            counter_max = 1
20
        counter += 1
21
        if (counter >= counter_max)
22
            counter = 0
23
    }
24
    else
25
        counter = 0
26
}