Help - Search - Members - Calendar
Full Version: Disable ALL controls for a short amount of time in battle?
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
mariofan12
Hello.

In my game, I am using an action command battle system I made myself with common events and no script! It works. You must press a button when a picture of the button shows up. This system uses conditional branches that say if the button is being pressed at the right time.
BUT, there is a problem. You're able to hold the button down instead of just pressing it when the button picture shows up, which is NOT supposed to happen! You're supposed th press the button RIGHT at the moment when the picture shows up for about 1 second, not just hold it down before it happens! That would be too easy and boring.

So, is there a way to disable the controls from the start of the attack to the button appearing? So you won't be able to hold the button down before the right time comes?
X-M-O
You could set the controls to a different button until the exact moment when it is the right button to press, and then between correct button presses you can reset the controls to other buttons so that they cannot hold down the correct button.
Just a thought. =]
mariofan12
QUOTE (X-M-O @ Sep 20 2012, 01:16 PM) *
You could set the controls to a different button until the exact moment when it is the right button to press, and then between correct button presses you can reset the controls to other buttons so that they cannot hold down the correct button.
Just a thought. =]


Thanks, but how do you set the controls to diffrent buttons? Is that an event command or a script thing? Because I don't know how to work scripts.
X-M-O
I believe you can do it using this method:

CODE
@>condition branch: script: Keyboard.trigger(Keys::A)
    @>text: Pushed Button A?
    @>choices: yes, no
      :  when [yes]
        @>script: Keyboard.trigger(Keys::P)
      :  when [no]
        @>
      : branch end
   : branch end
@>


Or something like that.
But you can use a script within an event, and I don't know enough about Ruby to know if you have to determine a library prior to using the "Keyboard.trigger" string.
mariofan12
Wait, so this will change the a button to the p button? I am kind of confused. I'm trying to make it so that the button must be pressed when the time comes, and if you miss at that exact time, you do less damage than you normally do. But you can't hold down the button before the attack.
X-M-O
I believe there is more to it, such as editing the script database to allow the button to be switched to another letter (P was an example).

I was suggesting that if you changed which button (A) could be used (and make that a letter that wouldn't be something you tell the player - such as the letter P instead of A) directly before the event, and then changed it for the event, and then back again, then you basically are limiting the button press to the exact time that the button should be pressed.
Difficult to explain, but hopefully that makes sense.

Either way, you might have to disable all button use until the moment you want the button to actually be pressed (and I forget how to do this). =\
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.