Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_torch_snowdin_14d_overworld_yellow_Step_0

(view raw script w/o annotations or w/e)
1
with (obj_torch_snowdin_14d_overworld_yellow)
2
{
3
    event_inherited()
4
    if (interact && obj_pl.direction == 90)
5
    {
6
        if global.geno_complete[2]
7
        {
8
            scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
9
            with (msg)
10
                message[0] = "* It's a regular torch."
11
            return;
12
        }
13
        else if (npc_flag == 0)
14
        {
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
            active = 1
17
        }
18
        else
19
        {
20
            scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
21
            is_talking = 1
22
            with (msg)
23
            {
24
                portrait = false
25
                switch other.npc_flag
26
                {
27
                    case 1:
28
                        message[0] = "* You know this job has a high#  turnover rate?"
29
                        message[1] = "* Crazy, right?"
30
                        message[2] = "* Apparently most monsters don't#  like having their head lit on#  fire."
31
                        message[3] = "* But, you see my head? That's#  natural flame, baby!"
32
                        message[4] = "* Best. Job. Ever!!!"
33
                        other.npc_flag = 2
34
                        break
35
                    case 2:
36
                        message[0] = "* I love being a torch!"
37
                        break
38
                }
39
40
            }
41
        }
42
    }
43
    if (active == 1)
44
    {
45
        if (image_index == (image_number - 1))
46
        {
47
            sprite_index = spr_torch_talk_snowdin_yellow
48
            image_speed = 0
49
            image_index = 0
50
            alarm[0] = 5
alarm[0]

global.cutscene = false scr_text() is_talking = 1 with (msg) { portrait = false sndfnt = 99 message[0] = "* Hello!" message[1] = "* Are you enjoying the warm# atmosphere that can only be# brought by a torch?" message[2] = "* Is it pleasant?" message[3] = "* Is it sentimental?" message[4] = "* Is it... attractive?" message[5] = "* Man, I love being a torch!" } npc_flag = 1
51
            active = 2
52
        }
53
        else
54
            image_speed = 0.2
55
    }
56
}