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.

Input

MSJ

Member

When looking through the script editor, I keep seeing input.something or input::something. Does anyone have a reference handy which will tell me exactly what this class or whatever it is does? Because I don't see it defined anywhere in the script editor.
 
Check the help file under the RGSS Modules, Input.

The basic syntax is:

Code:
Input.trigger?(Input::CONSTANT)
Input.press?(Input::CONSTANT)
Input.repeat?(Input::CONSTANT)

You can choose 1 of them, and use the constants defined. A, B, C, L, R, X, Y, Z, LEFT, RIGHT, DOWN, UP, CTRL, SHIFT, F5, F6, F7, F8, maybe a few others.
 

MSJ

Member

Right, I forgot my help file is in English now. Sorry about that.
Anyway, this is very limited. Is there a way use the entire keyboard? Like, a function which tells if the user has pressed a key corresponding with an ASCII value?
 
Yeah, there are several Keyboard Input Modules... personally, I can recommend Cybersam's, but I've heard most people saying that Near's is what they like better... it's up to you to decide, I think.

Also, AFAIK, Seph's list only missed the ALT constant...
 
Damn. I feel ashamed. I forgot one.

The problem with Cybersman's is instead of constants, he used globals. Lots and lots of globals. Near's uses constants and works much like the Input module in rmxp. Then again, Alework's Input Module is pretty good too.
 
Alework's is in his bigass package of 5 million scripts where you'd have to extract it out of... which is why I didn't even test it.

@Seph: The version I have doesn't use globals at all... well, considering there are 4 versions plus modifications of them (i customized mine as well), one of the previous ones had those globals you're talking about.
Oh, and the ALT note was just for the whole-ness of this thread :p
 

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