Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_tile_layer_show

(view raw script w/o annotations or w/e)
1
function tile_layer_show(argument0) //gml_Script_tile_layer_show
2
{
3
    var __depth = argument0
4
    var __layers = layer_get_all()
5
    var __numlayers = array_length_1d(__layers)
6
    for (var __i = 0; __i < __numlayers; __i++)
7
    {
8
        if (layer_get_depth(__layers[__i]) != __depth)
9
        {
10
        }
11
        else
12
        {
13
            var __els = layer_get_all_elements(__layers[__i])
14
            var __numels = array_length_1d(__els)
15
            for (var __j = 0; __j < __numels; __j++)
16
            {
17
                var __eltype = layer_get_element_type(__els[__j])
18
                if (__eltype == 7)
19
                    layer_tile_visible(__els[__j], true)
20
            }
21
        }
22
    }
23
}