Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dialogue_call_for_help_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (global.dialogue_open == false)
4
{
5
    if (draw_alpha > 0)
6
        draw_alpha -= 0.03
7
    else
8
        instance_destroy()
9
    return;
10
}
11
var MSG_ADVANCE = false
12
var message_length = string_length(message[message_current])
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 += 0.5
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
if (message_timer > -1 && cutoff == message_length)
36
{
37
    if (mT == -1)
38
        mT = message_timer
39
    if (mT > 0)
40
        mT -= 1
41
    else if (mT == 0)
42
    {
43
        mT = -1
44
        fade_out = true
45
    }
46
}
47
script_execute(gml_Script_scr_text_counter_overworld)
48
script_execute(gml_Script_scr_text_choices)
49
if (fade_out == true)
50
{
51
    if (draw_alpha > 0)
52
        draw_alpha -= 0.03
53
    else
54
    {
55
        fade_out = false
56
        MSG_ADVANCE = true
57
    }
58
}
59
if (MSG_ADVANCE || force_skip)
60
{
61
    if ((message_current + 1) < array_length_1d(message))
62
    {
63
        message_current += 1
64
        cutoff = 0
65
        draw_alpha = 1
66
    }
67
    else
68
        global.dialogue_open = false
69
    force_skip = false
70
}