Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dialogue_steamworks_33_Step_0

(view raw script w/o annotations or w/e)
1
var MSG_ADVANCE = false
2
var message_length = string_length(message[message_current])
3
if (fade_out == true)
4
{
5
    if (draw_alpha > 0)
6
        draw_alpha -= 0.1
7
    else
8
        instance_destroy()
9
    return;
10
}
11
else if (draw_alpha < 1)
12
    draw_alpha += 0.1
13
if (message_reset == true)
14
{
15
    message_reset = false
16
    message = 0
17
    event_perform(ev_create, 0)
18
    return;
19
}
20
if (keyboard_multicheck_pressed(1) && skippable == true)
21
    cutoff = message_length
22
if (cutoff < message_length)
23
{
24
    if (counter == 0)
25
    {
26
        cutoff += 1
27
        script_execute(gml_Script_scr_text_talk)
28
    }
29
}
30
else if (keyboard_multicheck_pressed(0) && skippable == true)
31
{
32
    if (choice == false)
33
        MSG_ADVANCE = true
34
}
35
script_execute(gml_Script_scr_text_counter_overworld)
36
if (outcome == p && choice == false)
37
{
38
    if ((message_current + 1) < array_length_1d(message))
39
    {
40
        message_current += 1
41
        cutoff = 0
42
    }
43
    else
44
        global.dialogue_open = false
45
    outcome = 0
46
}
47
if (message_current == ch_msg)
48
    choice = true
49
if (choice == true && cutoff >= string_length(message[message_current]))
50
{
51
    if global.down_keyp
52
    {
53
        if (p < 5 && ch[(p + 1)] != "")
54
            p += 1
55
        else
56
            p = 1
57
        audio_play_sound(snd_mainmenu_select, 1, 0)
58
    }
59
    if global.up_keyp
60
    {
61
        if (p > 1 && ch[(p - 1)] != "")
62
            p -= 1
63
        else
64
            p = 5
65
        audio_play_sound(snd_mainmenu_select, 1, 0)
66
    }
67
    if keyboard_multicheck_pressed(0)
68
    {
69
        outcome = p
70
        choice = false
71
        audio_play_sound(snd_confirm, 1, 0)
72
    }
73
}
74
if MSG_ADVANCE
75
{
76
    if ((message_current + 1) < array_length_1d(message))
77
    {
78
        message_current += 1
79
        cutoff = 0
80
    }
81
    else
82
        global.dialogue_open = false
83
}