Right now layers don't have a good way of being accessed apart from their names.
In certain games layers can have specific functionality... defining collisions for example. What if there are two levels of collisions in a room? a base collision and an overlay collision?
Right now the only way to access them is by hard coding stuff.. what if we could access layers by tags:
var debugLayers = layers_with_tag("debug");
This could return an array of layer indexes that are tagged as "debug". with this small added functionality we could create layer groups, for example enable or disable all "debug" layers. An aternative function could be used for querying multiple tags:
var layersWithAllTags = layers_with_tags([array_of_tags]);
I'm not suggesting using the "tag_get_asset_ids(tags, asset_type);" because as of this moment the layer isn't actually an asset and in my opinion it should stay that way ;) .. so it should have a dedicated function.
[EXTRA] Layers created by code could be marked with a tag upon creation and you could add/remove tags from layers at execution time.
Please sign in to leave a comment.