Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_conveyor_stamp_blue_Step_0

(view raw script w/o annotations or w/e)
1
if (activate == true)
2
{
3
    if (scene == 0)
4
        scene = 1
5
    activate = false
6
}
7
switch scene
8
{
9
    case 0:
10
        if (y > ystart)
11
            y -= (drop_speed * 0.5)
12
        break
13
    case 1:
14
        if (y < 568)
15
            y += drop_speed
16
        else
17
        {
18
            y = 568
19
            scene++
20
        }
21
        break
22
    case 2:
23
        audio_play_sound(snd_undertale_thud, 1, 0)
24
        scr_screenshake
scr_screenshake

function scr_screenshake(argument0, argument1) //gml_Script_scr_screenshake { if instance_exists(obj_screenshake_player) return; with (instance_create(__view_get((9 << 0), 0).x, __view_get((9 << 0), 0).y, obj_screenshake_player)) { alarm[0] intensity = argument1 } }
(6, 1)
25
        active_item = instance_place(x, y, obj_factory_02_conveyor_item)
26
        if (active_item != noone && (active_item.item_wrap == true || active_item.vspeed != 0))
27
            active_item = noone
28
        if (active_item != noone)
29
        {
30
            with (obj_factory_02_conveyor_item)
31
            {
32
                if (hspeed != 0)
33
                {
34
                    hspeed_old = hspeed
35
                    vspeed_old = vspeed
36
                    hspeed = 0
37
                   alarm[0]
38
                    obj_conveyor_belt.image_speed = 0
39
                }
40
            }
41
            with (active_item)
42
            {
43
                if (other.sprite_index == spr_conveyor_stamp_blue)
44
                {
45
                    sprite_index = spr_conveyor_items_blue_wrapped
46
                    if (item_type == "blue")
47
                        item_wrap_correct = true
48
                }
49
                else if (other.sprite_index == spr_conveyor_stamp_red)
50
                {
51
                    sprite_index = spr_conveyor_items_red_wrapped
52
                    if (item_type == "red")
53
                        item_wrap_correct = true
54
                }
55
                item_wrap = true
56
                x = other.x + 16
57
            }
58
            active_item = -4
59
            scene++
60
        }
61
        else
62
            scene++
63
        break
64
    case 3:
65
        cutscene_wait(0.5)
66
        break
67
    case 4:
68
        if (y > ystart)
69
            y -= (drop_speed * 0.5)
70
        if cutscene_wait(0.2)
71
            scene = 0
72
        break
73
}