| 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 | { |
| 16 | y += drop_speed; |
| 17 | } |
| 18 | else |
| 19 | { |
| 20 | y = 568; |
| 21 | scene++; |
| 22 | } |
| 23 | break; |
| 24 | case 2: |
| 25 | audio_play_sound(snd_undertale_thud, 1, 0); |
| 26 | scr_screenshake |
| 27 | active_item = instance_place(x, y, obj_factory_02_conveyor_item); |
| 28 | if (active_item != -4 && (active_item.item_wrap == true || active_item.vspeed != 0)) |
| 29 | active_item = -4; |
| 30 | if (active_item != -4) |
| 31 | { |
| 32 | with (obj_factory_02_conveyor_item) |
| 33 | { |
| 34 | if (hspeed != 0) |
| 35 | { |
| 36 | hspeed_old = hspeed; |
| 37 | vspeed_old = vspeed; |
| 38 | hspeed = 0; |
| 39 | alarm[0] |
| 40 | obj_conveyor_belt.image_speed = 0; |
| 41 | } |
| 42 | } |
| 43 | with (active_item) |
| 44 | { |
| 45 | if (other.sprite_index == spr_conveyor_stamp_blue) |
| 46 | { |
| 47 | sprite_index = spr_conveyor_items_blue_wrapped; |
| 48 | if (item_type == "blue") |
| 49 | item_wrap_correct = true; |
| 50 | } |
| 51 | else if (other.sprite_index == spr_conveyor_stamp_red) |
| 52 | { |
| 53 | sprite_index = spr_conveyor_items_red_wrapped; |
| 54 | if (item_type == "red") |
| 55 | item_wrap_correct = true; |
| 56 | } |
| 57 | item_wrap = true; |
| 58 | x = other.x + 16; |
| 59 | } |
| 60 | active_item = -4; |
| 61 | scene++; |
| 62 | } |
| 63 | else |
| 64 | { |
| 65 | scene++; |
| 66 | } |
| 67 | break; |
| 68 | case 3: |
| 69 | cutscene_wait(0.5); |
| 70 | break; |
| 71 | case 4: |
| 72 | if (y > ystart) |
| 73 | y -= (drop_speed * 0.5); |
| 74 | if (cutscene_wait(0.2)) |
| 75 | scene = 0; |
| 76 | break; |
| 77 | } |