RPG Maker MV

RPG Maker MV

Pegasis-Vera (She/They) 2018년 3월 6일 오후 6시 54분
Keyboard Access
I was wondering if anyone knows how to access different keyboard functions through scripts. I'm using the event system to make a game (a pretty large one at that), and well, only the arrow keys is kind of limiting me. I at least need the shift key and WASD... Mouse inputs would be a nice addition, but it's fine if I don't get that privilege.
< >
8개 댓글 중 1-8개 표시
Iguana Guy 2018년 3월 6일 오후 9시 48분 
Try yanfly's keyboard common events plugin perhaps?
Caethyril 2018년 3월 7일 오전 3시 59분 
IguanaRebel님이 먼저 게시:
Try yanfly's keyboard common events plugin perhaps?
I agree, here's a link: http://yanfly.moe/2016/01/23/yep-061-button-common-events/

And maybe this for mouse/touch input: https://github.com/quxios/QMV-Master-Demo/blob/master/js/plugins/QTouch.js
Pegasis-Vera (She/They) 2018년 3월 7일 오후 2시 37분 
Neato guys... And thanks Caethyril for giving me the mouse and touch input stuff as well. That'll help me make a custom menu. In case you guys are wondering, the game is going to be a platformer.
Pegasis-Vera (She/They) 2018년 3월 7일 오후 2시 46분 
Actually hold up, there aren't any new keyboard inputs to choose from...
Caethyril 2018년 3월 7일 오후 3시 16분 
Strawberry Ruby님이 먼저 게시:
Actually hold up, there aren't any new keyboard inputs to choose from...
Each of the plugin parameters determines the action associated with pressing a particular key on the keyboard. The video on the plugin page clarifies this at ~02:50. =)
Caethyril 님이 마지막으로 수정; 2018년 3월 7일 오후 3시 16분
Pegasis-Vera (She/They) 2018년 3월 7일 오후 3시 39분 
Caethyril님이 먼저 게시:
Strawberry Ruby님이 먼저 게시:
Actually hold up, there aren't any new keyboard inputs to choose from...
Each of the plugin parameters determines the action associated with pressing a particular key on the keyboard. The video on the plugin page clarifies this at ~02:50. =)
I noticed... It's going to take a while of reprogramming the game, but I'll do it if this is my only choice...
Pegasis-Vera (She/They) 2018년 3월 7일 오후 4시 48분 
So I'm wondering about how you actually control the release commands... When I release the jump key, I expect it to stop jumping at its current height, and when releasing the movement keys, I expect the player to stop moving.
Caethyril 2018년 3월 8일 오전 2시 29분 
Strawberry Ruby님이 먼저 게시:
So I'm wondering about how you actually control the release commands... When I release the jump key, I expect it to stop jumping at its current height, and when releasing the movement keys, I expect the player to stop moving.
Oh. Hm. Technically I don't think there's a "release" handler, it just checks !Input.isPressed or something similar. Yanfly's plugin repeats the event call once per wait interval while the button is held down (isRepeated). These are four key input functions you can experiment with in scripts (details in rpg_core.js):
  • Is the key currently pressed down?
    Input.isPressed(keyName)
  • Was key pressed down just this frame?
    Input.isTriggered(keyName)
  • Has the key been held down for this.keyRepeatWait time or more? (Defaults to 24 frames.)
    Input.isLongPressed(keyName)
  • Triggers once per this.keyRepeatInterval (6 frames default) after this.keyRepeatWait.
    Input.isRepeated(keyName)
You can search Yanfly's plugin's code (easy-to-read online version here[yanfly.moe]) for keyMapper to find the keyName for whatever key you're interested in using. ^_^

If you want more specific help, maybe describe what you're trying to achieve?
Caethyril 님이 마지막으로 수정; 2018년 3월 8일 오전 2시 37분
< >
8개 댓글 중 1-8개 표시
페이지당 표시 개수: 1530 50