Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

2 keys at once input

I'm using a non-SDK compatible script,
it also uses up all the keys (It can scroll through items and skills for quick-use)

So i wanted to have another command for scrolling through party members...
But since all the keys are taken, is there anyway to make so you have to press 2 keys at once?

Like.. Input::A,B (That didnt seem to work)

Thanks
 
EDIT:
Regarding above, it will work if you try...
Code:
if Input.press?(Input::A) and Input.press?(Input::B)
The default system's '.trigger?' code prevents you from checking both keys. Setting it to '.press?' allows it to see if a button is 'still' pressed so if both are still pressed... it'll work.

I'm currently working on the Keyboard Input Module, a revised version based on Near Fantastica's version... just extended some more. Mapped out nearly every key available and it can detect SHIFTED letters and numbers for ya.

But the system detects currently pressed keys, much like this code:
Code:
 if Input.pressed?(Input::A)
So when you hold a button down, the feature or code it is tagged to begins to run... and if you hold it down for a while, the 'feature' restarts over and over and over.

This is a little different than the
Code:
 if Input.trigger?(Input::A)
which recognizes that you pressed the button and only want it triggered once... until you let go of the button then press it again.

Hopefully, I'll get that figured out. May need a rework.
 
You're right, I forgot there is an Input.press? method, which does almost the exact work as Input.trigger?. But Derv, so far as I know (as stated in the RMXP help), isn't pressing and holding a button down is captured by Input.repeat? method?

I wonder why Enterbrain used Input.trigger? in all keypress recognition in the default system instead of Input.press?...
 
Input.trigger? = Checks to see if the key is down for one frame only

Input.press? = Checks to see if the key is down every frame

Input.repeat? = Checks to see if key is down every so frames
 
Well, trigger? supports the idea that if you hold the button down, it is recognized as only one occurance. Not until you let up off the button and press it again would another occurance be registered. press? supports the idea that as long as you keep the button held down... multiple occurances can occur.

I tried adapting a couple things to the Input Module (above) but found that adapting Nears' Squad Move system to using it... heh... holding down a switch actor button made them cycle until I let up off the 'coded' button. Moved VERY rapidly. It acted like the 'pressed?' function. Getting a 'trigger?' function would make you have to press the button over and over again for precision.

Again... I WANT to get that Trigger function to work. ;)

Dang hidden classes..... #:(

Hey,Yeyinde... when did you show up? :D
 
Thanks, it worked
but, with the leader swap script I was using it on,
the HUD i'm using doesn't change

but it will if the player gets damaged,
so is there a way to deal damage when you hit the keys?
 
I'm not familiar with the leader swap script you're using, but I think the HUD needs to be refreshed/updated (depending which method it uses to redraw the entire HUD)... so you don't need to damage your actor just to update the HUD (strange, isn't it?).
 
Exsharaen;270644 said:
I'm not familiar with the leader swap script you're using, but I think the HUD needs to be refreshed/updated (depending which method it uses to redraw the entire HUD)... so you don't need to damage your actor just to update the HUD (strange, isn't it?).


No, you do.... I've tried
I'm using SephirothSpawn's leader swap script
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top