tile_collision_manager()
/// tile_collision_manager(tile layer) // Create collision on tiles. for(i=10000000; i<10100000; i+=1) { if(tile_exists(i)) { if(tile_layer_find(argument0, tile_get_x(i), tile_get_y(i))) { // Example Sheet 1: if(tile_get_background(i) == tileset_name) { tile_collision_create(tile_left, tile_top, object x, object y, object, object2 x, object2 y, object2 (noone if no second object needed)) // Example: // tile_collision_create(260, 130, x, y, obj_collision_terrain02, x+64, y, obj_collision_terrain02); // tile_collision_create(650, 130, x, y+32, obj_collision_terrain07, x+64, y, obj_collision_terrain07); // tile_collision_create(520, 130, x, y, obj_collision_terrain06, x+64, y+32, obj_collision_terrain06); } } } }tile_collision_create()
/// tile_collision_create(x, y, object x, object y, object, object x2, object y2, object2) if(tile_get_left(i) == argument0 && tile_get_top(i) == argument1) { if(argument2 == x) { _x = 0; } else { _x = argument2; } if(argument3 == y) { _y = 0; } else { _y = argument3; } if(argument5 == x) { _x2 = 0; } else { _x2 = argument5; } if(argument6 == y) { _y2 = 0; } else { _y2 = argument6; } instance_create(tile_get_x(i)+_x, tile_get_y(i)+_y, argument4); if(argument7 != noone) { instance_create(tile_get_x(i)+_x2, tile_get_y(i)+_y2, argument7); } } else { return false; }Make sure to edit the manager script for your tilesets. Call the manager script in the rooms creation code and you're done. To get the tile_left and tile_top values open your tileset and check the position of the very first pixel
Quick example with gmate
https://cdn.discordapp.com/attachments/342651746251833344/562253898413506570/GMate_Source.gmk