Certain military anti-personnel mines are designed with triggers that arm when you step on them but do not explode until you step off. Hide one of them inside the floor (under a loose floorboard, perhaps) and you've got everything you just described.
Or you could just rig up something. Put a pressure plate in the floor and design the trigger to fire when you step off of it. You could have it explode or drop something heavy from the ceiling or, yeah, fire arrows or poison darts or whatever you want. Just hide the mechanism in the walls.
If you want them to know that they've stepped onto a trap, then you can just add some kind of warning. An ominous beep, perhaps followed by a recorded warning or a sign that says "one more step and you die!" or something.
Or make it a two-stage process. Step on to the pressure plate, and the guns pop up or the wall panels drop off or whatever. Step off it, they fire.