I would like to make an encounter in a storage room which is full of barrels and chests. The room is, seemingly, only guarded by goblin archers. When a PC runs past certain barrels, I would like goblins to pop out and attack. I figure the goblins will have to roll stealth with full cover, so the that the players will have a chance to perceive them.
My question: Can the Goblins "Ready an Action" to spring out as the player is moving, and if so, would they get an opportunity attack? Would a character in this situation with high enough perception be able to adjust their movement after they've started moving?