Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
GermanyXItaly1000

Shift Key - Buttons

Question

Hey there! It's been a while since I posted here.

 

But I've run into a problem with my game, and it's with a button that I've selected to be the main option to do something. We already have the arrow keys or a, w, s, d to move and x, c, and sometimes z to select or cancel (depending on the RPG Maker version, I think). So I decided to try to select another button to do something else--I have a working shooting system in my game, only I needed to select a key to use that, each time I press on it, will fire the gun.

 

So I tried a few keys, and when I pressed on them, that didn't work.

 

I used the script: 
Input.trigger?(Input::A) which lets me use the shift key instead of the other keys.

 

But the problem with this is when I press Shift multiple times without pause, I activate my computer's StickyKeys, and I don't want that to happen, especially when others play my game. So I was looking for a way to change the Shift key to another key for the game, and it seems I'm having trouble. I'd like to use either the r, v, or z button as a fire key, but can't figure out how to change the script to let me do that.

 

Can someone help me? Thanks if you can. :)

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I had a very similar issue when working on a project. 

 

http://textdump.net/read/3236/ Here is the script to use for that. I apologise for uploading it to textdump.net, but I usually find issies with copy-paste-ing from code boxes and such on occasion, and it's a big script, so I wouldn't want you to have that issue.

 

So, put this script below everything else but above main in your scripts, and then, either in your script or in your event (I assume you're using an event), go to Condition Branch, select script, and use Keyboard.trigger(Keys::?) - where the ? is whatever key you'd like. Hope that helps.

Edited by Tomo2000

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...