In RPG Maker, you can present players with a set of choices to select. However, by default, they can wait as long as they want to make a selection.
Using this plugin, you can automatically force a selection, to create a mechanic where the player has a limited amount of time to make a decision.
Once the allotted time has expired, the game will automatically make a selection for the player, and the event will continue as you have designed it.
Plugin: download here (right-click, save-as)
Download ths plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the HIME_TimedChoiceSelection plugin.
Once it is in your list of plugins, turn the plugin on.
To set a timer for the choice selection, use the script call
HMS.setChoiceTimer( DURATION )
Where the DURATION is the number of frames that the game should wait before it automatically selects a choice.
For example, assuming 60 frames per second, and you wanted to give the player 5 seconds to make a decision, you would make the script call
HMS.setChoiceTimer( 300 )
The “Cancel” choice will be automatically selected when the time runs out. Note that this script call does not automatically display a timer.
Manual Force Cancel
Perhaps the choice timer I provided is not enough for your needs. Instead of using the simple script call, you could instead build your own parallel process event that will act as the choice timer.
So for example, you could have your event start a timer, and then turn on a switch
The switch would enable a parallel process event, say a common event, whose job is to check if the time has run out, and to cancel the choice using the following script call:
Once this script call is made, the game will select the “cancel” choice (assuming it is possible).
How can I download the plugin? I don’t know how to download plugin this way…
I seem to have encountered a bug where the timer continues after a choice is made and skips a line later.
For example, I set the timer to 600 frames, so 10 seconds.
I make a choice before the timer runs out, and the Event continues with text.
But the timer seems to still be active. 10 seconds after it started, it will automatically skip a line in the Event, which can completely mess up the flow, especially if another choice comes at that time.
Does it work on troop events? Wherein you will pick an answer but if the time runs out you will get a message Time’s Up and the enemy will attack you?
I set the cancel to branch, but when I run the battle test, an error appears
SCRIPT CALL ERROR
TypeError: undefined is not a function
But I already removed YEP_EquipCore.js inmy plugin lists 🙁
Ok so I removed the YEP_EquipCore.js and the error is not showing anymore. But, when the time runs out, the text “Time’s Up!” does not show, and the enemy only casts magic and does not attack the character even if the choice Cancel includes Show Text “Time’s Up!” and Force Action: Enemy, Fire, Random (I set it to random although the main character is only one)
Can anyone help me about this? It will be a very great help for me 🙁
Not working with Input Number though
Haven’t tried this out yet, but I assume that it won’t work properly if ‘Cancel’ is disallowed?
There are scenarios I could see a designer wanting to use the Timer without allowing an explicit manual Cancel – such as a timed trivia game. It makes sense to “credit” the player with a wrong answer if they let time run out, but it makes no sense to credit them with a wrong answer if they accidentally hit the Cancel key while answering a trivia question.
Perhaps there’s a way to create an explicit “Time’s Up” branch (or even to make the Cancel branch into a “Time’s Up” branch exclusively)?
Sorry if my assumptions are incorrect!!
Your assumption is correct: it defaults to the cancel option. And if cancel is not allowed, nothing..should happen.
It wouldn’t be possible to create a “time-up” branch since the editor doesn’t support additional types of branches.
Hi Hime, nice scripts you get here. With this, however, i couldn´’t make it force a choice with a parallel event. It awaits for the choice to be made before executing it. I’m using your common event queue and yanfly message core with expansion. Maybe it’s his script that’s interfering in yours.
Great script. Would it be possible to add a visual bar/gauge that depletes as the time runs out?
It would really complete the feature of this awesome plugin. If you could allow reskin of the gauge it would be great too!!
I am currently in the process of implementing a timer system that allows you to customize the way timers are shown, which is intended to be used with this plugin.
Here is an example: https://www.youtube.com/watch?v=3VHMrOFXz7U