BMatjasic
Member
Hello guys, I've been working on a level editor for my game and i've been wondering, how can you add tilesets layered with certain depth. I've tried the following, but it didn't seem to work...:
Thanks in advance!
HTML:
if(mouse_check_button(mb_left) and keyboard_check(vk_shift) and !point_in_rectangle(device_mouse_x_to_gui(0), device_mouse_y_to_gui(0),x,y,x+sprite_get_width(spr_obj_selector), y+sprite_get_height(spr_obj_selector))) {
if(mouse_x < room_width and mouse_y < room_height) {
layer_force_draw_depth(false,selected_depth );
tilemap_set_at_pixel(selected_tilemap, global.selected_tile, mouse_x, mouse_y);
}
}