Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_instance_place_all

(view raw script w/o annotations or w/e)
1
function instance_place_all(argument0, argument1, argument2) //gml_Script_instance_place_all
2
{
3
    var _a = undefined
4
    var _n = 0
5
    var _h = abs(sprite_height)
6
    var _id = instance_place(argument0, argument1, argument2)
7
    while _id
8
    {
9
        with (_id)
10
        {
11
            _a[_n] = id
12
            _n++
13
            y -= (abs(sprite_height) + _h)
14
        }
15
        _id = instance_place(argument0, argument1, argument2)
16
    }
17
    for (var _i = 0; _i < _n; _i++)
18
    {
19
        with (_a[_i])
20
            y += (abs(sprite_height) + _h)
21
    }
22
    return _a;
23
}