Dogwithswords
Member
Okay! I already figured out how to create tiles programmatically in GMS:2
As far as I know, tiles are deleted like so:
SO... I'm wondering how I can effectively delete all tiles at a y value greater than the room_height?
I did try a for loop but that didn't work.
If there is some sort of nifty trick I may be missing, please let me know. Thank you!
As far as I know, tiles are deleted like so:
Code:
tilemap_set_at_pixel(global.thisTileset, 0, x, y);
I did try a for loop but that didn't work.
Code:
var tileXCount;
var isEmpty = tilemap_get_at_pixel(global.thisTilemap, tileXCount * 32, room_height * 1.5);
for (tileXCount = 0; tileXCount < (room_width/32); tileXCount++)
{
if (!tile_get_empty(isEmpty))
{
tilemap_set_at_pixel(global.thisTilemap, tileXCount * 32, room_height/2);
}
}
if (tileXCount = room_width/32)
{
tileXCount = 0;
}