Complex sentence: Von Hapen puts the room under arrest, but is distracted by Mary's entrance, enabling Schaffer to draw a hidden pistol--killing von Hapen and the other German officers.
Split into simpler sentences: Von Hapen puts the room under arrest, but is distracted when Mary arrives in turn. Schaffer seizes the opportunity to kill von Hapen and the other German officers.