Ready Action is already a thing on D&D. At least at my table though pur DM makes us describe what we are waiting for to happen. If it happens the attack is used "like an enemy entering the room" and such.