Prototyping- After closing an overly I need the after delay to continue on to the next screen

Hello! I am prototyping a game to help kids learn to read. I am using after delay between each screens to make it appear like a train is moving along a countryside background. Upon clicking a button I need an overlay to slide in. Then when the overlay is closed I need the after delay to continue so that it appears that the train starts moving again. I’d really appreciate any help if you’ve had any success with a similar prototype in Figma. Thanks in advance :slight_smile: