Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_factory_02_seesaw_item_ready_Create_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var item_type_last = obj_factory_02_seesaw_puzzle.conveyor_item_type_last
4
var item_type_repeat_count = obj_factory_02_seesaw_puzzle.conveyor_item_type_repeat_count
5
var item_type_repeat_count_max = obj_factory_02_seesaw_puzzle.conveyor_item_type_repeat_count_max
6
destroy_self = false
7
item_type = choose("blue", "red")
8
if (item_type == item_type_last)
9
{
10
    if (item_type_repeat_count < item_type_repeat_count_max)
11
        obj_factory_02_seesaw_puzzle.conveyor_item_type_repeat_count += 1
12
    else
13
    {
14
        do
15
        {
16
            item_type = choose("blue", "red")
17
        } until (item_type != item_type_last);
18
    }
19
}
20
else
21
    obj_factory_02_seesaw_puzzle.conveyor_item_type_repeat_count = 0
22
obj_factory_02_seesaw_puzzle.conveyor_item_type_last = item_type
23
image_speed = 0
24
switch item_type
25
{
26
    case "blue":
27
        sprite_index = spr_conveyor_items_blue_wrapped
28
        break
29
    case "red":
30
        sprite_index = spr_conveyor_items_red_wrapped
31
        break
32
}
33
34
scene = 0
35
target_y = 110