Timer mechanism

i wanna do a 20 second timer. After we see somethjing in a room, the timer turns on. the only way to avoid insta death through the timer is by going back to bed. How can i implement this mechanism?
Think there's an event command for this. Give me a moment to send a pic.
Timer Tutorial
Realized I don't own MV. It's pretty straightforward, though.
After we see something in a room, the timer turns on
Have this turn on a Timer switch

In the bed event use
$gameSelfSwitches.setValue([mapNumber, timerEventNumber, 'A'], false);
Have this turn on a Timer switch

In the bed event use
$gameSelfSwitches.setValue([mapNumber, timerEventNumber, 'A'], false);
This would work, but I should think it would be a bit simplified if you did away with the self switch.

Just make the triggering event set the timer and turn on the global Timer On switch.

Then what you show as page 2 only has a Condition of the global Timer switch, and when you touch the bed it turns that switch back off.

I don't see that the self switch or script call are necessary.
Yeah, I just modified it to cut out the self switch
thank you so much!!! I'll try it out and let you know. <3

Original thread: https://forums.rpgmakerweb.com/threads/timer-mechanism.158556/