depth = -y

if (place_meeting(x, y, obj_player)){
	global.death_message = "You were squashed by a falling boulder! >:("
	//global.floor_count = 0
	room_goto_next()
}
else if (place_meeting(x, y, obj_enemy)){
	 instance_destroy(instance_place(x, y, obj_enemy))
}

if (image_index == sprite_get_number(sprite_index) - 1){
	repeat (20) instance_create_layer(x, y, "Instances", obj_dust)
	
	instance_destroy()
}