Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_text_counter_color

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

function scr_text_counter_color() //gml_Script_scr_text_counter_color { 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: if (color_count >= 1) { switch current_char_2 { case ".": case ",": case "?": case "!": counter_max = global.text_counter_max break default: if (color_count >= 2) { switch current_char_3 { case ".": case ",": case "?": case "!": counter_max = global.text_counter_max break default: counter_max = 1 } break } else counter_max = 1 } break } else 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_color
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
                if (color_count >= 1)
16
                {
17
                    switch current_char_2
18
                    {
19
                        case ".":
20
                        case ",":
21
                        case "?":
22
                        case "!":
23
                            counter_max = global.text_counter_max
24
                            break
25
                        default:
26
                            if (color_count >= 2)
27
                            {
28
                                switch current_char_3
29
                                {
30
                                    case ".":
31
                                    case ",":
32
                                    case "?":
33
                                    case "!":
34
                                        counter_max = global.text_counter_max
35
                                        break
36
                                    default:
37
                                        counter_max = 1
38
                                }
39
40
                                break
41
                            }
42
                            else
43
                                counter_max = 1
44
                    }
45
46
                    break
47
                }
48
                else
49
                    counter_max = 1
50
        }
51
52
        if (hold > 1)
53
            counter_max = 1
54
        counter += 1
55
        if (counter >= counter_max)
56
            counter = 0
57
    }
58
    else
59
        counter = 0
60
}