Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dunes_35b_gamer_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited()
2
if (interact && sprite_index == spr_cafe_npc_gamer)
3
{
4
    if (obj_pl.x < x)
5
    {
6
        image_xscale = -1
7
        x = xstart + 1
8
    }
9
    else
10
    {
11
        image_xscale = 1
12
        x = xstart
13
    }
14
    waiter = 1
15
    scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() //gml_Script_scr_cutscene_start { global.cutscene = true obj_pl.state = gml_Script_scr_frozen_state obj_pl.image_index = 0 obj_pl.image_speed = 0 }
()
16
}
17
if (waiter == 0)
18
{
19
    if (sprite_index == spr_cafe_npc_gamer_talk)
20
    {
21
        sprite_index = spr_cafe_npc_gamer
22
        image_index = image_number - 4
23
    }
24
    else if (image_index <= 0)
25
    {
26
        image_speed = 0
27
        sprite_index = spr_cafe_npc_gamer
28
    }
29
    else if (image_speed == 0)
30
        image_speed = -0.25
31
}
32
if (waiter > 0)
33
{
34
    if (waiter == 1)
35
    {
36
        if (sprite_index == spr_cafe_npc_gamer)
37
        {
38
            if (image_speed == 0)
39
                image_speed = 0.25
40
            if (image_index >= (image_number - 1))
41
            {
42
                image_speed = 0
43
                sprite_index = spr_cafe_npc_gamer_talk
44
                waiter = 2
45
            }
46
        }
47
        return;
48
    }
49
    scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
50
    switch npc_flag
51
    {
52
        case 0:
53
            with (msg)
54
            {
55
                talker[0] = other.object_index
56
                message[0] = "* Yo, what do ya want? I'm in#  the middle of a gaming sesh."
57
                message[1] = "* Oh, you're a kid like me! I#  bet you're good at these#  machines."
58
                message[2] = "* Have you tried out Mew Mew#  Love Blaster? It's addicting!"
59
                message[3] = "* I suck at it though."
60
                message[4] = "* I hear there's a final boss#  but I've never seen anyone#  reach it."
61
                message[5] = "* Bet you could totally kick its#  butt!"
62
            }
63
            break
64
        case 1:
65
            with (msg)
66
            {
67
                talker[0] = other.object_index
68
                message[0] = "* If you're around the area and#  need monsters to hang with,"
69
                message[1] = "* My friend group are the#  coolest kids around."
70
                message[2] = "* The head count has been down#  lately... but it's still a fun#  time!"
71
            }
72
            break
73
        case 2:
74
            with (msg)
75
            {
76
                talker[0] = other.object_index
77
                message[0] = "* Yo, sorry if I'm hogging this#  game."
78
                message[1] = "* I'm determined to unlock a#  secret character I saw on#  Undernet."
79
                message[2] = "* So far I haven't had any luck,#  but it's gotta be real! I saw#  the screenshot!"
80
            }
81
            break
82
        case 3:
83
            with (msg)
84
            {
85
                talker[0] = other.object_index
86
                message[0] = "* Can't talk. Gaming."
87
            }
88
            break
89
    }
90
91
    if (!global.dialogue_open)
92
    {
93
        if (npc_flag < 3)
94
            npc_flag += 1
95
        waiter = 0
96
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
97
    }
98
}