• 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!

Can a tile set be used to select objects to be rendered?

Im trying to figure out how to do an isometric view which is simple enough. That said, i have very specific things i want to be able to do with the walls (destroyable environment) and the method of drawing sprites from based on a tile layer falls short here.
Is there a way I can create objects from a tile layer instead of just sprites?
 

mX273

Member
like this
GML:
// Execute this code once after the room has started

for (var yy = 0; yy < room_height; yy += tileSize)
{
    for (var xx = 0; xx < room_width; xx += tileSize)
    {
        var tileNumber = tilemap_get_at_pixel(tilemapID, xx, yy);
        if (tileNumber == 3)
        {
            // create your instance (instance_create_depth / instance_create_layer)
        }
        else if (tileNumber == 5)
        {
            // create another instance (instance_create_depth / instance_create_layer)
        }
    }
}

// code not tested
 
Top