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.

Create an event

We will start off by creating a new event.

And it's blank.


Set up the loop

Alright, in all seriousness, let's get started. First, you want to create a loop. Let's look for it.

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


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.

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).


Create a conditional branch

Now set up a conditional branch.

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.)

Your Contents box should now look something like this:


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.

And here's the final product! 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.

Share


About the Author

Comments

Guest_castoronline said 1st September 2016

That's exactly what I'm looking, just one thing, how do I make that if the button is not pressed on X amount of time/frames you get damage? I can't figure that by myself...

Guest_ash said 29th September 2016

If I understand you correctly castoronline, then that should be fairly easy. I'm gonna walk through EVERY step though, so forgive me for the parts that are obvious lol.

 

For starters, the event command you'll want to use to reduce HP is in Event Commands Page 1, under the header Actor, and it's called "Change HP...". Selecting that lets you choose the target, either from a drop down menu (which allows you to select either your entire party, or a single actor (the list it's drawing from is in Database, on the page called Actors) or based on a variable. I won't go into the process of using a variable, since it's not what you asked and this is getting long already lol. For now, simply use the default target "Entire Party".

 

Your next choice is Operation: Increase or Decrease. To cause damage, select decrease. (side note, following all of these steps, but using increase instead is a great way to set up a HP regen event)

 

The final part for this command is to set the amount of damage you want to be inflicted each time this is called. Again, I won't go into variables here, so lets use the example of selecting Constant and with a value of 100.

 

OK, we've made the damage command! In the example from the original poster, you could place this command just under the line Branch End. Congratulations, you now hurt your entire party 100 damage every single frame (or whatever value you selected for your wait command) until the button is pressed!

 

Now, I know, I know, I haven't exactly answered your question. You wanted to know how to set this up to hurt the player based on a specific time segment. Now that we have our damage command, it's a simple matter of using a variable and a conditional branch!

 

First, create a new conditional branch just below your damage command (remember, it's called Change HP). Instead of using Tab 4 for this conditional branch like you did earlier, you'll want to use Tab 1. Select Variable. This brings up three options for you to select.
First, which variable do you want? Click the three little dots and it'll open your variable list. If you haven't used any variables yet, the game has pre-loaded the first 100 (none of them are named yet); feel free to select any one you want. If you've already made a ton of variables, you might have these initial 100 already assigned to other events... have no fear! You can always make more by clicking Change Max, and increasing your number. For example, if you've used 100 already, click Change Max, change the number from 100 to 101, and click OK. Variable 101 has been added to the bottom of your list! Select whichever variable you want to use (I recommend selecting a new, as of yet unused, variable) and name it something that will remind you what this variable does, or where to find it. For this example, lets say you selected variable 101, and you named it "Damage per 10 seconds". Then click OK.
Second, the option below your variable is, by default, set to "Equal To" which probably would work fine, but I HIGHLY RECOMMEND you use "Greater Than or Equal To" instead.
Third, you can either use a constant, or another variable. Go ahead and use constant, and for now lets use the number 600.
Finally, before clicking OK at the bottom, uncheck the box that says "Set handling when conditions do not apply". Done? Alright, click that OK button!

 

Now, we want to move the "Change HP: Entire Party, -100" from being just above the line "Conditional Branch: Variable [0101: Damage per 10 seconds >= 600" to just below it. Highlight Change HP, copy it, delete it, and repaste it inside your conditional branch.

 

OK, almost there! Next, just below the Change HP line, create a new event command. From Event Commands Page 1, under Game Progression, select "Control Variables...". Your first option, Variable, is set to Single by default, which is what we want. To the right, there's a box showing variable 0001, and a button with "...", click this and select variable 101 from your list.
Your second option, Operation, is (by default) set to "Set" which is what we want.
Your third option, Operand, is (by default) set to "Constant" and with a value of 0, which is what we want. Go ahead and click OK.

 

Alright, one last step! Highlight the control variable command that you just created and copy it, but DON'T delete it! Just above the line "Repeat Above" paste this copy of your control variable command, then highlight it and press the space bar. You now see the options we set just a moment ago. Leave the first option, Variable, as it is. Change the second option, Operation, from "Set" to "Add". Change your third option from "Constant 0" to "Constant 1".

 

You did it, you're done! But wait, what exactly did we do?

 

Here's the quick answer: the original poster's loop runs multiple times a second (with a wait of 1 frame, I assume it runs once every frame, or 60 times per second). Now, every time that loop runs, it adds 1 to variable 101: Damage per 10 seconds. If my assumption is correct, then it will add 60 to the variable every second, and 600 to the variable every 10 seconds. Once the variable reaches or exceeds 600, the conditional branch I had you create will take effect, and the party will lose 100 HP. At the same time, your variable will reset to 0, and the whole timing mechanism starts over. (NOTE: my assumption might be incorrect; with a wait of 1 frame, this loop might only be running 30 times per second. If the player is being hurt too slowly, try decreasing the conditional branch value from 600 to 300; in fact, feel free to play around with this value. A larger number increases the length of time between damage, a smaller number decreases the time).

 

I hope this was helpful! I'm running out the door just now, so I don't have time to proof-read this to make sure it makes sense lol. I hope it does, and that I answered your question completely!

Quick Reply

Guest

Enter a username

Security check: What is 8 plus 2?