Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_writer_Alarm_0

(view raw script w/o annotations or w/e)
1
var playsound = 0;
2
if (rate > 2)
3
{
4
    alarm[1]
 = 1;
gml_Object_obj_writer_Alarm_1.gml

if (pos < (length + 2))
scr_textsound();
5
}
6
else
7
{
8
    sound_timer--;
9
    if (first_alarm == 1 && pos >= 2 && sound_timer <= 0)
10
        playsound = 1;
11
}
12
if (pos <= length)
13
    alarm[0]
 = rate;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
14
else
15
    reachedend = 1;
16
if (first_alarm == 0)
17
{
18
    getchar = string_char_at(mystring, 1);
19
    if (getchar == "\\")
20
        pos += 3;
21
    else
22
        pos += 1;
23
    first_alarm = 1;
24
}
25
else
26
{
27
    getchar = string_char_at(mystring, pos);
28
    nextchar = string_char_at(mystring, pos + 1);
29
    if (getchar == "`")
30
    {
31
        pos += 2;
32
        exit;
33
    }
34
    if (getchar == "&" || getchar == "\n")
35
        pos += 1;
36
    if (getchar == "\\")
37
        pos += 3;
38
    if (getchar == "/")
39
    {
40
        halt = 1;
41
        if (nextchar == "%")
42
            halt = 2;
43
        alarm[0]
 = -1;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
44
    }
45
    getchar = string_char_at(mystring, pos);
46
    nextchar = string_char_at(mystring, pos + 1);
47
    if (getchar == "|")
48
        pos += 2;
49
    if (getchar == "^")
50
    {
51
        pos += 2;
52
        if (alarm[0] > 0)
53
        {
54
            if (nextchar == "1")
55
                alarm[0]
 += 5;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
56
            if (nextchar == "2")
57
                alarm[0]
 += 10;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
58
            if (nextchar == "3")
59
                alarm[0]
 += 15;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
60
            if (nextchar == "4")
61
                alarm[0]
 += 20;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
62
            if (nextchar == "5")
63
                alarm[0]
 += 30;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
64
            if (nextchar == "6")
65
                alarm[0]
 += 40;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
66
            if (nextchar == "7")
67
                alarm[0]
 += 60;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
68
            if (nextchar == "8")
69
                alarm[0]
 += 90;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
70
            if (nextchar == "9")
71
                alarm[0]
 += 150;
gml_Object_obj_writer_Alarm_0.gml

var playsound = 0; if (rate > 2) { alarm[1]
 = 1;
} else { sound_timer--; if (first_alarm == 1 && pos >= 2 && sound_timer <= 0) playsound = 1; } if (pos <= length) alarm[0]
 = rate;
else reachedend = 1; if (first_alarm == 0) { getchar = string_char_at(mystring, 1); if (getchar == "\\") pos += 3; else pos += 1; first_alarm = 1; } else { getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "`") { pos += 2; exit; } if (getchar == "&" || getchar == "\n") pos += 1; if (getchar == "\\") pos += 3; if (getchar == "/") { halt = 1; if (nextchar == "%") halt = 2; alarm[0]
 = -1;
} getchar = string_char_at(mystring, pos); nextchar = string_char_at(mystring, pos + 1); if (getchar == "|") pos += 2; if (getchar == "^") { pos += 2; if (alarm[0] > 0) { if (nextchar == "1") alarm[0]
 += 5;
if (nextchar == "2") alarm[0]
 += 10;
if (nextchar == "3") alarm[0]
 += 15;
if (nextchar == "4") alarm[0]
 += 20;
if (nextchar == "5") alarm[0]
 += 30;
if (nextchar == "6") alarm[0]
 += 40;
if (nextchar == "7") alarm[0]
 += 60;
if (nextchar == "8") alarm[0]
 += 90;
if (nextchar == "9") alarm[0]
 += 150;
} } pos += 1; } if (reachedend_sound_play) { if (reachedend && !reachedend_sound_played) playsound = 0; } if (playsound)
scr_textsound();
72
        }
73
    }
74
    pos += 1;
75
}
76
if (reachedend_sound_play)
77
{
78
    if (reachedend && !reachedend_sound_played)
79
        playsound = 0;
80
}
81
if (playsound)
82
    
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 == "&" || getchar == "\n") { 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) { if (textsound == snd_txtq) { audio_stop_sound(snd_txtq_2); qv = snd_play(snd_txtq_2); qp = 0.9 + random(0.15); snd_pitch(qv, qp); sound_timer = 2; } else if (textsound == snd_txtspam) { audio_stop_sound(snd_txtspam2); snd_play_x(snd_txtspam2, 0.8, 1.2); sound_timer = 2; } else if (textsound == snd_txtsans) { audio_stop_sound(snd_txtsans); qv = snd_play(snd_txtsans); sound_timer = 2; } else if (textsound == snd_tv_voice_short) { var rand = irandom(8) + 1; if (global.flag[1054 tenna_voice_pitch] <= 0) global.flag[1054 tenna_voice_pitch] = 1; var pitchrandom = (0.86 + random(0.35)) * global.flag[1054 tenna_voice_pitch]; var soundindex = "snd_tv_voice_short"; if (rand >= 2) soundindex += ("_" + string(rand)); soundindex = asset_get_index(soundindex); audio_stop_sound(snd_tv_voice_short); audio_stop_sound(snd_tv_voice_short_2); audio_stop_sound(snd_tv_voice_short_3); audio_stop_sound(snd_tv_voice_short_4); audio_stop_sound(snd_tv_voice_short_5); audio_stop_sound(snd_tv_voice_short_6); audio_stop_sound(snd_tv_voice_short_7); audio_stop_sound(snd_tv_voice_short_8); audio_stop_sound(snd_tv_voice_short_9); snd_play_x(soundindex, 0.7, pitchrandom); sound_timer = 3; } else { snd_play(textsound); } with (obj_face_parent) mouthmove = 1; miniface_pos++; } ...
();