Jump to content

* * * - - 2 votes

Waiting until Button Input. [Also applies to XP and VX]


This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1 PK8


    I sense there's something in the wind...

  • Members
  • 510 posts

Posted 22 May 2012 - 12:48 PM

This is probably one of those rare moments where I actually write a tutorial. It's something I just learned about, and I consider myself to be a bit terrible at explaining things but I hope it helps. (And I'm going to assume you're familiar with some of RPG Maker's event commands.)

With this tutorial, I hope to teach you how to create your own Wait Until Button Input. This is probably useful should you want to pause your evented cutscene and then let the player know to keep going by pressing a particular button or two.

1. Create an Event.
We will start off by creating a new event.
Posted Image

And it's blank.
Posted Image

2. Set up the loop.
Alright, in all seriousness, let's get started. First, you want to create a loop. Let's look for it.
Posted Image

Click it, and it gets placed into the Contents box. So far so good.
Posted Image

3. Make a Wait Command.
Next up, you'll want to place a Wait Command inside the loop in order to prevent your game from completely choking.
Posted Image

Now you should set up the wait frames. You could choose a small number. I prefer 1 (unless the game gets intensely laggy for me).
Posted Image

4. Create a Conditional Branch.
Now set up a conditional branch.
Posted Image

Head into Tab 4 and Click the radio button next to "Button". Set the Input Button to whatever you wish. (If you're new to RMing, just go with C for now.)
Posted Image

Your Contents box should now look something like this:
Posted Image

5. Break the Loop upon pressing the button.
Just one more thing we need to do. Head to the Event Commands and look for Break Loop.
Posted Image

And here's the result! Hope you enjoyed the image-heavy tutorial. I'm sure you guys can pull something a little more creative than what I just did, but I hope it helped all the same. :)
Posted Image

Edited by PK8, 23 May 2012 - 12:43 PM.

I'm currently not supporting any of my scripts because I recently came back from a lengthy hiatus. I will begin revamping almost all of them in due time. For now, look at the Progress page on my site to check my current progress.

Let's improve $imported!
$imported Expansion | $imported[:SCRIPT_LIST] | Cross-engine Scripting


#2 Nemau


    Advanced Member

  • Early Adopter
  • 141 posts

Posted 22 May 2012 - 07:50 PM

I haven't tested it yet but if it works (and I'm sure it does!) it's a very very usefull tutorial, because the "Waiting until Button Input" was, in my opinion, the most important thing which missed in latest RMs. Thank you!

#3 GnlMarcus



  • Members
  • 7 posts

Posted 22 February 2013 - 11:19 PM

When I do this, the character just freezes on the tile (Always rechking the loop)

#4 GnlMarcus



  • Members
  • 7 posts

Posted 23 February 2013 - 11:00 AM

And the wait 1 frame creates incredible lag

#5 ragnawind


    Advanced Member

  • Members
  • 169 posts

Posted 28 February 2013 - 10:18 PM

Personally, I just make a switch for a wait until button pressed. It might only be possible with something like viewing something, though, and pausing time, basically until a button is pressed. I did something like it with showing a picture. Here is a sample of it's coding if anyone needs it for something like what I described using it for. I also added a thing to switch between pages of a book using pictures. The images are attached.

Attached Files