Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_barrier_container_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
switch scene
4
{
5
    case 1:
6
        cutscene_wait(1)
7
        break
8
    case 2:
9
        vspeed = -2
10
        if (y <= ystart)
11
        {
12
            y = ystart
13
            vspeed = 0
14
            cutscene_advance()
15
            if (!audio_is_playing(snd_undertale_impact))
16
                audio_play_sound(snd_undertale_impact, 1, 0)
17
        }
18
        break
19
    case 3:
20
        if (global.route != 3)
21
            return;
22
        cutscene_wait(2)
23
        break
24
    case 4:
25
        sprite_index = open_sprite
26
        image_speed = 2
27
        image_index = 0
28
        cutscene_advance()
29
        break
30
    case 5:
31
        if (image_index >= (image_number - 1))
32
        {
33
            image_speed = 0
34
            image_index = image_number - 1
35
            cutscene_advance()
36
        }
37
        break
38
    case 6:
39
        cutscene_wait(1.5)
40
        break
41
    case 7:
42
        if (instance_exists(self_soul) && floor(self_soul.image_index) == 0)
43
        {
44
            self_soul.image_speed = 0
45
            self_soul.sprite_index = spr_geno_soul_idle
46
            self_soul.y -= 16
47
            self_soul.track_spawner = false
48
            cutscene_advance()
49
        }
50
        break
51
    case 8:
52
        cutscene_wait(1)
53
        break
54
    case 9:
55
        if instance_exists(self_soul)
56
        {
57
            with (self_soul)
58
            {
59
                if (y < (ystart - 70))
60
                {
61
                    vspeed = lerp(vspeed, 0, 0.2)
62
                    if (vspeed > -0.01)
63
                    {
64
                        other.scene++
65
                        vspeed = 0
66
                        idle_animation = true
67
                    }
68
                }
69
                else if (vspeed > -0.5)
70
                    vspeed -= 0.05
71
            }
72
        }
73
        break
74
    case 10:
75
        cutscene_wait(1)
76
        break
77
    case 11:
78
        if (y < (ystart + 30))
79
        {
80
            if (vspeed < 1)
81
                vspeed += 0.05
82
        }
83
        else
84
        {
85
            sprite_index = spr_container_submerge
86
            image_index = 0
87
            image_speed = 1
88
            vspeed = 0
89
            y = ystart
90
            cutscene_advance()
91
        }
92
        break
93
    case 12:
94
        if (image_index >= (image_number - 1))
95
        {
96
            instance_destroy()
97
            return;
98
        }
99
        break
100
}