Something similar, though not exactly a trap, that Pathfinder has rules for is a Cave-In or Collapse hazard. From the description, it can be triggered:
A weakened ceiling might collapse when subjected to a major impact or concussion. A character can cause a cave-in by destroying half the pillars holding up the ceiling.
A weakened ceiling can be spotted with a DC 20 Knowledge (engineering) or DC 20 Craft (stonemasonry) check. Remember that Craft checks can be made untrained as Intelligence checks. A dwarf can make such a check if he simply passes within 10 feet of a weakened ceiling.
Along with a Save to reduce damage
Characters in the bury zone of a cave-in take 8d6 points of damage, or half that amount if they make a DC 15 Reflex save. They are subsequently buried. Characters in the slide zone take 3d6 points of damage, or no damage at all if they make a DC 15 Reflex save. Characters in the slide zone who fail their saves are buried.
and additional effects:
Characters take 1d6 points of nonlethal damage per minute while buried. If such a character falls unconscious, he must make a DC 15 Constitution check each minute. If it fails, he takes 1d6 points of lethal damage each minute until freed or dead.
Characters who aren’t buried can dig out their friends. In 1 minute, using only her hands, a character can clear rocks and debris equal to five times her heavy load limit. The amount of loose stone that fills a 5-foot-by-5-foot area weighs 1 ton (2,000 pounds). Armed with an appropriate tool, such as a pick, crowbar, or shovel, a digger can clear loose stone twice as quickly as by hand. A buried character can attempt to free himself with a DC 25 Strength check.
So it could be seen as very trap-like, though is actually called a Hazard, not a Trap. Ways you could use this are maybe some weak, wooden pillars holding up a weakened ceiling, and the bad guys shoot out the pillars as the PCs approach, causing the collapse. You could "trick" or otherwise leave PCs to taking the pillars out themselves. Or maybe if they use certain spells in the area it's enough of a concussion to knock loose the ceiling. Just a couple ideas of using this.