Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_factory_02_seesaw_item_ready_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if destroy_self
4
{
5
    var new_item = instance_create_depth(x, y, depth, obj_factory_02_item_destroy)
6
    new_item.sprite_index = sprite_index
7
    instance_destroy()
8
    return;
9
}
10
if (y < target_y)
11
    y += 1
12
else if (!alarm[0])
13
    alarm[0] = 15
alarm[0]

var new_item = instance_create_depth(x, y, depth, obj_factory_02_seesaw_item) with (new_item) { sprite_index = other.sprite_index image_index = other.image_index item_type = other.item_type } instance_destroy()
14
x = xstart + (irandom_range(-2, 2))