Is it possible to have a short timer run on an event that is overridden if another action is preformed?

I'm currently trying to make a diner type minigame for my RPG.

The idea is that a customer will approach a countertop and request a certain item. I'd then like a timer to start which will dictate when they've waited too long and will leave without paying. Is there a way to have that timer, but have it overridden if they receive the item they requested within the time limit?

I plan on having around a dozen or so customers filtering in asking for different things but all either resulting in receiving the item they requested or leaving because the player took too long, I have no idea if this is possible?
All you need is to set aside that many variables. Initialize them to -1.

When a customer places an order, set their variable to however many seconds they're willing to wait.

The next event page has a condition of their variable is >= 0, and has them walking out.

The third page has a condition of their variable is >= 1, and you can interact with the event to give them their food. Set the variable back to -1.

Then have a parallel event on the map that has Wait 60, then subtracts one from each of the waiting customer variables if it's greater than 0.
Yes, you'd use a plugin like Galv's event spawn timers or just go full scripting with a parallel common event counting down like Trihan's resource node script.

All you need is to set aside that many variables. Initialize them to -1.

When a customer places an order, set their variable to however many seconds they're willing to wait.

The next event page has a condition of their variable is >= 0, and has them walking out.

The third page has a condition of their variable is >= 1, and you can interact with the event to give them their food. Set the variable back to -1.

Then have a parallel event on the map that has Wait 60, then subtracts one from each of the waiting customer variables if it's greater than 0.
Thanks for this.

However, it's been years since I last booted up RPG Maker so I'm a little lost on what a lot of this means.

I have a basic understanding of how variables function but I'm still a bit confused.
Yes, you'd use a plugin like Galv's event spawn timers or just go full scripting with a parallel common event counting down like Trihan's resource node script.

I've given this a look at it seems promising.

Only thing I can't figure out is how to disable the timer if the customer has been given the item they requested and then for them to pay and leave.
However, it's been years since I last booted up RPG Maker so I'm a little lost on what a lot of this means.
I have a basic understanding of how variables function but I'm still a bit confused.
My best advice is for you to start.

Follow the instructions, make the two events (one customer and the parallel). If it doesn't work correctly, or there's a sentence you can't figure out how to translate into instructions, then you have a specific thing to point to.

You can post a screenshot of the events you made and ask what's wrong, or you can quote a sentence and ask what it means.

Just saying "I'm lost on a lot of it" doesn't really tells us anything on how to help you.
It is also possible to use route on the customer, each time you serve their food, you set a new route to override the old route.
My best advice is for you to start.

Follow the instructions, make the two events (one customer and the parallel). If it doesn't work correctly, or there's a sentence you can't figure out how to translate into instructions, then you have a specific thing to point to.

You can post a screenshot of the events you made and ask what's wrong, or you can quote a sentence and ask what it means.

Just saying "I'm lost on a lot of it" doesn't really tells us anything on how to help you.
Fiddled around a bit and a lot of it came back to me and it's looking like it works!

Thanks 🙂

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-have-a-short-timer-run-on-an-event-that-is-overridden-if-another-action-is-preformed.169813/