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.

Key Input Module 1.30 [XP/VX/VXA]

Gust

Member

^, ~, ´ and ` work if I hold the accent key and then press the character. ¨ doesn't.
I'm using the character_trigger method. It returns the accent character once (when I press it), and then if I keep holding it and press the letter I want, it returns the correct character.
This works for ^, ~, ´ and ` but not for ¨ :huh:
 

Toshi

Member

Hi.
I'am new to rgss and i've got a question:
Can somebody give me a codeexample how to open with the letter "W" a common event?
I tried a

if keys.press?(0x57) then
print("Hallo Welt")
end

as a test but it gives me a error... :(
 
Toshi":20d42ylj said:
Hi.
I'am new to rgss and i've got a question:
Can somebody give me a codeexample how to open with the letter "W" a common event?
I tried a

if keys.press?(0x57) then
print("Hallo Welt")
end

as a test but it gives me a error... :(

What error did it give?

Anyway, what you would want to do is set it up with a conditional branch, go to page four, and place the following bit of code into the script box.

Code:
Keys.press?(Keys::W)

Then you can proceed like it's a normal event.

Also, looking closer at what you typed, I can see why that would give an error. In Ruby, names are case sensitive, meaning that keys.press? would give an error while Keys.press? would not. If that wasn't your issue, I'm sure I'd be much more capable of helping once I know what the error message is.
 

Zeriab

Sponsor

I highly suggest that you make it easy to customize the repeat delay and repeat rate which will be very helpful for people changing the framerate.
It would be more awesome if you read the user specified repeat delay and rate and then use that to figure out how many frames that corresponds to relative to the framerate.

*hugs*
 
Zeriab":2chnld9r said:
I highly suggest that you make it easy to customize the repeat delay and repeat rate which will be very helpful for people changing the framerate.
It would be more awesome if you read the user specified repeat delay and rate and then use that to figure out how many frames that corresponds to relative to the framerate.

*hugs*
Actually, that's a really good idea! I'll put that in my little book of things to do.
 
I've just updated this script to a new version. The condensed changelog is below.

Version 1.30:
  • Removed redundant type-checks originally intended for safety.
  • Moved some repeated code into a new function: Keys.validate_key
  • Changed the license to the MIT license for better ease of use.
  • Tested to ensure functionality in RPG Maker XP, RPG Maker VX, and RPG Maker VX Ace.
  • Heavily updated the format of the initial post.

The most important update here is that this script is now under the MIT license, which means that you're free to use it as you see fit so long as you include the license somewhere. It also means I can't see any legal repercussions for what you do with the script, since that's not under my control.
 
That's cool. Not many scripters go for cross compatability, and even less with such a friendly license. Considering this script is pretty much a necessity, that's a real gift to the community.
 
Princess Amy":jt5bkwh2 said:
That's cool. Not many scripters go for cross compatability, and even less with such a friendly license. Considering this script is pretty much a necessity, that's a real gift to the community.

In this case, cross compatibility is a bit of a misnomer. This will only work on Windows. That said, it works in VX, VX Ace, and XP simply because it doesn't do much of anything with any of the default classes. It hooks into a single function that all three share, and then the rest of it is independent of the RM* client you've chosen.

In terms of the license, I would have put it under idgaf, but I at least want to protect myself.
 

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