Re-binding mouse buttons.

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
I'm looking for a way to rebind my mouse keys. Right now I have my left-click shooting projectiles with Galvs Map Projectiles, but I'm hoping to bind right click to a separate attack (or visa versa.) Currently it brings up menu/cancels, but I don't want it to do that. Thanks in advance everyone.
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
I'm looking for a way to rebind my mouse keys. Right now I have my left-click shooting projectiles with Galvs Map Projectiles, but I'm hoping to bind right click to a separate attack (or visa versa.) Currently it brings up menu/cancels, but I don't want it to do that. Thanks in advance everyone.
Updated my TouchInput plugin once again to fit this request :)

CTB_TouchInput Plugin: Click Here To Download
upload_2019-12-9_22-7-59.png

To Simulate "Holding" Right Click Down :)
Auto-Fire :)
upload_2019-12-9_22-53-17.png
upload_2019-12-9_22-54-38.png

As usual let me know how it goes :popcorn: Worked nicely for me :)
 
Last edited:

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
Updated my TouchInput plugin once again to fit this request :)

CTB_TouchInput Plugin: Click Here To Download

To Simulate "Holding" Right Click Down :)
Auto-Fire :)
View attachment 128648
View attachment 128649

As usual let me know how it goes :popcorn: Worked nicely for me :)
I just checked it out, question though, what script would I use to run a common event? And is that how I would do that. Right now I have "TouchInput.isPressed()" for left click to run a common event that fires my projectiles. Would this be something I put into your "Right mouse click script" area? EXAMPLE: $gameTemp.reserveCommonEvent(0021);
 

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
Updated my TouchInput plugin once again to fit this request :)

CTB_TouchInput Plugin: Click Here To Download

To Simulate "Holding" Right Click Down :)
Auto-Fire :)
View attachment 128648
View attachment 128649

As usual let me know how it goes :popcorn: Worked nicely for me :)
I'm close, I found out it's "touchInput.isCanceled" however I can't hold the button down in this case. I wonder if there's a way to do some sort of "touchInput.isPressed" with right click.
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
Updated the script to v0.9 :cutesmile::thumbsup-right:
Made a small demo for you... Please let me know if that's about right?
Demo: Click Here to Download
Plugin: Click Here to Download

Also included a new version of my LastEventCalled Script (v1.1) which can be helpful for this and now includes support for Galv Projectiles. ;)

Demo Notes:
You will need to add Galv_MapProjectiles to the js/plugins folder in demo though as I don't want to infringe on any script re-hosting laws.

Default Left Click sets Switch #9. The switch parallel runs common event #9. Switch is shut off upon Releasing Left Click
Default Right Click sets Switch #10. The switch parallel runs common event #10. Switch is shut off upon Releasing Right Click
Both are an Auto Fire while held

Talking to the Scarecrow toggles variable 20 (left click switch ID) & variables 21 (right click switch ID)...
In game changing changing variable #20 to 11. Then Left Click turns on Switch #11. The switch parallel runs common event #11.
Switch is shut right after common event being ran.
In game changing changing variable #21 to 12. Then Right Click turns on Switch #12. The switch parallel runs common event #12.
Switch is shut right after common event being ran.
Both are a single click now.

See demo for all the info.
Let me know how it goes for ya. :popcorn:
 
Last edited:

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
Updated the script to v0.9 :cutesmile::thumbsup-right:
Made a small demo for you... Please let me know if that's about right?
Demo: Click Here to Download
Plugin: Click Here to Download

Also included a new version of my LastEventCalled Script (v1.1) which can be helpful for this and now includes support for Galv Projectiles. ;)

Demo Notes:
You will need to add Galv_MapProjectiles to the js/plugins folder in demo though as I don't want to infringe on any script re-hosting laws.

Default Left Click sets Switch #9. The switch parallel runs common event #9. Switch is shut off upon Releasing Left Click
Default Right Click sets Switch #10. The switch parallel runs common event #10. Switch is shut off upon Releasing Right Click
Both are an Auto Fire while held

Talking to the Scarecrow toggles variable 20 (left click switch ID) & variables 21 (right click switch ID)...
In game changing changing variable #20 to 11. Then Left Click turns on Switch #11. The switch parallel runs common event #11.
Switch is shut right after common event being ran.
In game changing changing variable #21 to 12. Then Right Click turns on Switch #12. The switch parallel runs common event #12.
Switch is shut right after common event being ran.
Both are a single click now.

See demo for all the info.
Let me know how it goes for ya. :popcorn:
After some time of messing around I got it working. I made it more simple by just having it switch events on and off. But I did run into a troublesome glitch that is easy to miss. If you click anywhere on the screen during the "RPG Maker Logo" at the start of the game, it will crash and give some error messages. But so far great job!
 

Attachments

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
After some time of messing around I got it working. I made it more simple by just having it switch events on and off. But I did run into a troublesome glitch that is easy to miss. If you click anywhere on the screen during the "RPG Maker Logo" at the start of the game, it will crash and give some error messages. But so far great job!
Ah, I've found another one, this one's hard to explain though. Every so often, when I'm holding down right click and firing away, it'll stop firing in all directions, and lock out a certain direction (so far its been left and/or right) so if you move your mouse direction that way the player might just keep firing up or down or whatever. Seems to start working again once ive released the button and re-pressed it however.
 

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
Ah, I've found another one, this one's hard to explain though. Every so often, when I'm holding down right click and firing away, it'll stop firing in all directions, and lock out a certain direction (so far its been left and/or right) so if you move your mouse direction that way the player might just keep firing up or down or whatever. Seems to start working again once ive released the button and re-pressed it however.
Hope you're not sick of me yet, but I also noticed the right click on the "new game" title screen also gives these errors. Also, there's probably a way around this one, but are you able to make it so you cant mash the button and keep firing? I think because everytime you lift your finger, the left_click Switch is going off again, so we're able to spam it, as opposed to having it WAIT for the amount of time given. Know what I mean?
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,343
Reaction score
8,529
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.


@PKirkby , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.


Double posting is posting right after yourself when no one else has replied. If you would like to quote more than one post, just click quote for each message and it will paste them into one response. Additionally, if you want to address someone specific, you can type @ followed by their username and it will tag them, as I've done here.
 

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
[move]Plugin Requests[/move]
[dpost]@PKirkby [/dpost]
Double posting is posting right after yourself when no one else has replied. If you would like to quote more than one post, just click quote for each message and it will paste them into one response. Additionally, if you want to address someone specific, you can type @ followed by their username and it will tag them, as I've done here.
Oh, I guess I should just edit my original post. My apologies, thanks.
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
Hope you're not sick of me yet
lol naw it's all good... there's bound to be problems. helps me learn too.:)
make it so you cant mash the button and keep firing?
That would usually be called a "cooldown"... I will look into adding this :)
Every so often, when I'm holding down right click and firing away, it'll stop firing in all directions, and lock out a certain direction (so far its been left and/or right) so if you move your mouse direction that way the player might just keep firing up or down or whatever. Seems to start working again once I've released the button and re-pressed it however.
Hmm... yeah that's odd... I'll have to do some further testing on this one.
Edit: In v0.93 I also updated the sensitvity again... maybe that helped fix this? idk. Please test.
but I also noticed the right click on the "new game" title screen also gives these errors.
woops, tada! fixed now :)

Edit:
@PKirkby Ok updated to v0.93 try that. :)

Please let me know if that stops the all error messages. :)
 
Last edited:

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
lol naw it's all good... there's bound to be problems. helps me learn too.:)
That would usually be called a "cooldown"... I will look into adding this :)
Hmm... yeah that's odd... I'll have to do some further testing on this one.
Edit: In v0.93 I also updated the sensitvity again... maybe that helped fix this? idk. Please test.

woops, tada! fixed now :)

Edit:
@PKirkby Ok updated to v0.93 try that. :)

Please let me know if that stops the all error messages. :)
A quick test and it seems to be doing great. You made quick work of that, I'll let you know if I discover anything else, until then, thanks for all your help!
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
A quick test and it seems to be doing great. You made quick work of that, I'll let you know if I discover anything else, until then, thanks for all your help!
Yay! No prob. Glad to hear it's working as needed. :cutesmile:
I will probably update this further and create a thread for it soon. :popcorn:

Well as always,
Happy Game Making!
 

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
Yay! No prob. Glad to hear it's working as needed. :cutesmile:
I will probably update this further and create a thread for it soon. :popcorn:

Well as always,
Happy Game Making!
Yeah, I'd love to see an update, as the cooldown is still have an issue. I do my own cooldown wait time within my common events, so in all honesty I don't know how I'd go about this.

Edit: I noticed the issue while moving mouse passed the X horizontal plane is back, where it's overly sensitive and turning player up too soon. All I changed was my resolution to 1080p. But when I change it to a lower res, it still seems pretty sensitive.
 
Last edited:

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
520
First Language
Javascript
Primarily Uses
RMMZ
Yeah, I'd love to see an update, as the cooldown is still have an issue. I do my own cooldown wait time within my common events, so in all honesty I don't know how I'd go about this.

Edit: I noticed the issue while moving mouse passed the X horizontal plane is back, where it's overly sensitive and turning player up too soon. All I changed was my resolution to 1080p. But when I change it to a lower res, it still seems pretty sensitive.
Oh yeah woops... I think I accidentally reverted that fixed now in v0.97... (I think at least)

Welllll actually going to be a major rewrite soon the to the whole script soon in order to better support a few things like creating a better way for the button held down, better multi-touch/click support, and better cooldowns...

but... anyways demo of v0.97...
0.97:
CT_Bolt's TouchInput Plugin Demo: Click Here to View

Note:
Again Galv's script not included in demo. Download and paste in js/plugins. ;)

Known bugs:
Galv Projectiles "direction lock out" when using multi-touch

PS.
Attempted a few grenade sprites. (see in demo)
Not the best, I'm certainly no pixel artist, but perhaps they will help in someway. idk.

Let me know how it goes.
 

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
Oh yeah woops... I think I accidentally reverted that fixed now in v0.97... (I think at least)

Welllll actually going to be a major rewrite soon the to the whole script soon in order to better support a few things like creating a better way for the button held down, better multi-touch/click support, and better cooldowns...

but... anyways demo of v0.97...
0.97:
CT_Bolt's TouchInput Plugin Demo: Click Here to View

Note:
Again Galv's script not included in demo. Download and paste in js/plugins. ;)

Known bugs:
Galv Projectiles "direction lock out" when using multi-touch

PS.
Attempted a few grenade sprites. (see in demo)
Not the best, I'm certainly no pixel artist, but perhaps they will help in someway. idk.

Let me know how it goes.
Sweet, Looks good. I like the idea of the flashing grenade. Can't wait to see the plugins final product.
 

PKirkby

Veteran
Veteran
Joined
Oct 26, 2019
Messages
157
Reaction score
18
First Language
english
Primarily Uses
RMMV
Oh yeah woops... I think I accidentally reverted that fixed now in v0.97... (I think at least)

Welllll actually going to be a major rewrite soon the to the whole script soon in order to better support a few things like creating a better way for the button held down, better multi-touch/click support, and better cooldowns...

but... anyways demo of v0.97...
0.97:
CT_Bolt's TouchInput Plugin Demo: Click Here to View

Note:
Again Galv's script not included in demo. Download and paste in js/plugins. ;)

Known bugs:
Galv Projectiles "direction lock out" when using multi-touch

PS.
Attempted a few grenade sprites. (see in demo)
Not the best, I'm certainly no pixel artist, but perhaps they will help in someway. idk.

Let me know how it goes.
Hey man, how's things going with your plugin. I realised today that the version I have seems to affect text boxes (it makes them go away right away instead of waiting for button input.) Did you end up working more on it?
 

Xntraxz

Villager
Member
Joined
Jun 7, 2018
Messages
14
Reaction score
1
First Language
Spanish
Primarily Uses
RMMV
Hi, im right here for the CT_bolt plugin as well, it is being very helpful in my project, im wondering Ct, if you are still working on the plugin, i find that the sensibilty when the character is facing "down" can be done a little better,because Right, Up, and left, works really good!, but when you click on the down side, it is a little difficult to face it... idk if it can be modified to reach that,

Thanks in advance.!

PD: i just realized that this error happens when the game is full screen, windowed works fine, (tested in my game and the demo that you have uploaded).
problem.jpg
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

My dynamic weather system grows... now with cloud cover influenced by wind speed! (4x playback) (Not final cloud image/map)
Wrote a plugin today that allows you to assign BGM, Battlebacks, and even Battle Entry SE's on a per-troop basis. Introducing a random encounter with a high-pitched Chicken Squeal is worth it all by itself.
Stream will be live shortly with some game development! Feel free to drop by!
Asphodelethe wrote on skybluehair's profile.
Hi! I loe your desert NPCs for adding some variety. I've used them in a free game (The Snow Elf on Itch.io) and I'd love to use them in the new game I'm working on, which I hope to release commercially. I'd love your permission if I could have it!


So I figured out how to put words and pictures in the screen transition. It even wipes away from both the top and bottom. The possibilities are endless! :LZSexcite: I'm going to devise secret messages now for them because I'm a terrible wonderful person like that. :kaopride:

Forum statistics

Threads
105,763
Messages
1,016,240
Members
137,449
Latest member
patriciabrown
Top