• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Help with tilemap assigning

Ok this is a fairly streight forward question. I have a sprite sheet as a sprite which is attached to a tilemap.

I have a tile layer attached to said tilemap. I set one of the cells in the map to something other than 0 so i can see it. So far so good.

Now my question is how to do this proglamatically. When I click on the layer and select the tilesheet to point to, this is what I want to be done in code as well as assigning the tilemap sprite to the created tileset.

I tried the following code

tilemap_tileset("lyr_tile", tl_test); // This produces no errors but does not assign the tileset as expected.

What I want Idealy is to create all the layers and all the tilemaps and assign them all on the fly in code.

Hope this makes sense. I wonder why the code I already stated above does not work because I can't see any other functions that look like they would work for this.

EDIT: This does work but only when an existing tileset is assigned. If it's not assigned to somthing before you copmpile it won't work. If you have you can change it. I need to change it from being nothing to something.
 
Last edited:
Top