Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_npc_template_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited()
2
if interact
3
{
4
    scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
5
    is_talking = 1
6
    switch npc_flag
7
    {
8
        case 0:
9
            with (msg)
10
            {
11
                portrait = false
12
                sndfnt = 99
13
                message[0] = "* I read something in a book once."
14
                message[1] = "* It said, \"If life comes at you#  too fast, press X and take it#  slow.\""
15
                message[2] = "* Whatever that means."
16
            }
17
            npc_flag = 1
18
            break
19
        case 1:
20
            with (msg)
21
            {
22
                portrait = false
23
                sndfnt = 99
24
                message[0] = "* You know, I read something else#  in that same book."
25
                message[1] = "* It said, \"Eat food to stay#  strong and healthy!\""
26
                message[2] = "* That one is plain obvious."
27
            }
28
            npc_flag = 2
29
            break
30
        case 2:
31
            with (msg)
32
            {
33
                portrait = false
34
                sndfnt = 99
35
                message[0] = "* Wanna know another excerpt from#  that book?"
36
                message[1] = "* It said, \"Please stop talking#  to me, I've exhausted my book#  quotes.\""
37
                message[2] = "* A very wise book, indeed."
38
            }
39
            npc_flag = 3
40
            break
41
        case 3:
42
            with (msg)
43
            {
44
                portrait = false
45
                sndfnt = 99
46
                message[0] = "* Please leave me alone."
47
            }
48
    }
49
50
}