Timed Choice Selection

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

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.

Download

Plugin: download here (right-click, save-as)

Installation

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.

Usage

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.

timedChoiceSelection2

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

timedChoiceSelection3

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:

$gameMessage.forceCancel()

timedChoiceSelection4

Once this script call is made, the game will select the “cancel” choice (assuming it is possible).

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

5 Responses

  1. Wavelength says:

    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!!

    • Hime says:

      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.

  2. PresaDePrata says:

    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.

  3. AT Anthony says:

    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!!

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax