Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_factory_02_conveyor_item_dog_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (destroy_self > 0)
4
{
5
    if (stage == 3)
6
    {
7
        obj_ceroba_npc.npc_direction = "right"
8
        obj_ceroba_npc.action_sprite = false
9
    }
10
    if (destroy_self == 1)
11
    {
12
        vspeed = -3
13
        gravity = 0.25
14
        destroy_self = 2
15
    }
16
    else
17
    {
18
        if (image_alpha <= 0)
19
            instance_destroy()
20
        image_angle += 10
21
        image_alpha -= 0.1
22
    }
23
    return;
24
}
25
switch scene
26
{
27
    case 0:
28
        if (x <= 395)
29
        {
30
            hspeed = 0
31
            cutscene_wait(0.5)
32
        }
33
        break
34
    case 1:
35
        sprite_index = spr_dog_jump
36
        gravity = 0.5
37
        vspeed = -6
38
        hspeed = -1
39
        depth = -999
40
        audio_play_sound(snd_undertale_pombark, 1, 0)
41
        audio_play_sound(snd_playerjump, 1, 0)
42
        cutscene_advance()
43
        break
44
    case 2:
45
        if (y >= 660)
46
        {
47
            sprite_index = spr_dog_walk
48
            vspeed = 0
49
            hspeed = 0
50
            gravity = 0
51
            audio_play_sound(snd_mart_impact_2, 1, 0)
52
            depth = (-y)
53
            scene++
54
        }
55
        break
56
    case 3:
57
        cutscene_wait(1.5)
58
        break
59
    case 4:
60
        image_xscale = -1
61
        hspeed = 5
62
        audio_play_sound(snd_undertale_pombark, 1, 0)
63
        cutscene_advance()
64
        break
65
    case 5:
66
        cutscene_wait(5)
67
        break
68
    case 6:
69
        instance_destroy()
70
        break
71
}
72
73
vspeed += gravity
74
x += hspeed
75
y += vspeed