Deltarune (Chapter 1) script viewer

← back to main script listing

gml_GlobalScript_scr_textsound

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

function
scr_textsound()
{ playtextsound = 1; if (button2_h() == 1) playtextsound = 0; if (skippable == 0) playtextsound = 1; if (playtextsound == 1) { if (rate <= 2) getchar = string_char_at(mystring, pos); else getchar = string_char_at(mystring, pos - 1); play = 1; playcheck = 0; if (getchar == "&") { if (rate < 3) { playcheck = 1; getchar = string_char_at(mystring, pos + 1); } else { play = 0; } } if (getchar == " ") play = 0; if (getchar == "^") play = 0; if (getchar == "!") play = 0; if (getchar == ".") play = 0; if (getchar == "?") play = 0; if (getchar == ",") play = 0; if (getchar == ":") play = 0; if (getchar == "/") play = 0; if (getchar == "\\") play = 0; if (getchar == "|") play = 0; if (getchar == "*") play = 0; if (play == 1) { snd_play(textsound); with (obj_face_parent) mouthmove = 1; } } }
()
2
{
3
    playtextsound = 1;
4
    if (button2_h() == 1)
5
        playtextsound = 0;
6
    if (skippable == 0)
7
        playtextsound = 1;
8
    if (playtextsound == 1)
9
    {
10
        if (rate <= 2)
11
            getchar = string_char_at(mystring, pos);
12
        else
13
            getchar = string_char_at(mystring, pos - 1);
14
        play = 1;
15
        playcheck = 0;
16
        if (getchar == "&")
17
        {
18
            if (rate < 3)
19
            {
20
                playcheck = 1;
21
                getchar = string_char_at(mystring, pos + 1);
22
            }
23
            else
24
            {
25
                play = 0;
26
            }
27
        }
28
        if (getchar == " ")
29
            play = 0;
30
        if (getchar == "^")
31
            play = 0;
32
        if (getchar == "!")
33
            play = 0;
34
        if (getchar == ".")
35
            play = 0;
36
        if (getchar == "?")
37
            play = 0;
38
        if (getchar == ",")
39
            play = 0;
40
        if (getchar == ":")
41
            play = 0;
42
        if (getchar == "/")
43
            play = 0;
44
        if (getchar == "\\")
45
            play = 0;
46
        if (getchar == "|")
47
            play = 0;
48
        if (getchar == "*")
49
            play = 0;
50
        if (play == 1)
51
        {
52
            snd_play(textsound);
53
            with (obj_face_parent)
54
                mouthmove = 1;
55
        }
56
    }
57
}