Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_swimmer_snowdin_14d_overworld_yellow_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] = "* Swimming is a great full-body#  workout."
14
                message[1] = "* Are you seeing these limbs?#  I've never been so toned!"
15
                message[2] = "* On top of that, I've dropped a#  whole goggle size!"
16
            }
17
            npc_flag = 1
18
            break
19
        case 1:
20
            with (msg)
21
            {
22
                portrait = false
23
                sndfnt = 99
24
                message[0] = "* Sorry, can't talk anymore."
25
                message[1] = "* I've got swimming to do."
26
                message[2] = "* Those pounds don't drop#  themselves."
27
            }
28
            break
29
    }
30
31
}
32
image_speed = 0.3
33
if (is_talking == true)
34
    return;
35
if (swimmer_dir == "left")
36
{
37
    if (x > 115)
38
    {
39
        if (swimmer_hsp > (-max_swimmer_hsp))
40
            swimmer_hsp -= swimmer_accel
41
    }
42
    else
43
        swimmer_dir = "right"
44
}
45
if (swimmer_dir == "right")
46
{
47
    if (x < 175)
48
    {
49
        if (swimmer_hsp < max_swimmer_hsp)
50
            swimmer_hsp += swimmer_accel
51
    }
52
    else
53
        swimmer_dir = "left"
54
}
55
if (swimmer_hsp < 0)
56
    image_xscale = 1
57
else if (swimmer_hsp > 0)
58
    image_xscale = -1
59
x += swimmer_hsp