Status
Not open for further replies.

LeeOccleshaw

Stone Dragon Workshop
Veteran
Joined
Jun 9, 2015
Messages
155
Reaction score
82
First Language
English
Primarily Uses
Hey, just wondering if anyone knows of a way to disable the automatic movement when holding down the left mouse button to walk? I don't want to disable it completely as I need single clicks to still move as intended. Thanks!
 

astracat111

Astra Cat
Veteran
Joined
Jun 16, 2015
Messages
207
Reaction score
121
First Language
English
Primarily Uses
Hey, just wondering if anyone knows of a way to disable the automatic movement when holding down the left mouse button to walk? I don't want to disable it completely as I need single clicks to still move as intended. Thanks!



Ah, I can help you to disable mouse movement completely but I'm not sure how to actually disable it partially like you're saying. 


I just commented out the code here to do it. This is different than you want, but it should lead you in the right direction I think.


//Turn movement of player through mouse or touch off.
Scene_Map.prototype.processMapTouch = function() {
/*
if (TouchInput.isTriggered() || this._touchCount > 0) {
if (TouchInput.isPressed()) {
if (this._touchCount === 0 || this._touchCount >= 15) {
var x = $gameMap.canvasToMapX(TouchInput.x);
var y = $gameMap.canvasToMapY(TouchInput.y);
//-------> if (Player is adjecent to event) {
$gameTemp.setDestination(x, y);
//-------> }
}
this._touchCount++;
} else {
this._touchCount = 0;
}
}
*/
};






Maybe you need to remove this part of the code? 

Code:
[COLOR=rgb(136,0,0)]this._touchCount >= 15[/COLOR]
 
Last edited by a moderator:

LeeOccleshaw

Stone Dragon Workshop
Veteran
Joined
Jun 9, 2015
Messages
155
Reaction score
82
First Language
English
Primarily Uses
Thanks - I am not sure how to 'play around' with that touchCount - I don't know how to script etc. I tried simply changing the number 15 to another and it didn't seem to do anything! ^^
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
453
Reaction score
166
First Language
Not English
Primarily Uses
N/A
Try change 


TouchInput.isPressed()


to

Code:
[COLOR=rgb(136,0,0)]TouchInput.isTriggered()[/COLOR]
 

CynicSyndrome

Veteran
Veteran
Joined
May 4, 2017
Messages
57
Reaction score
39
First Language
English
Primarily Uses
RMMV
Ah, I can help you to disable mouse movement completely but I'm not sure how to actually disable it partially like you're saying.

how much of it do you need to disable it completely? does it stay disabled between maps? after game closed and reloaded
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,746
Reaction score
8,520
First Language
German
Primarily Uses
RMMV
@CynicSyndrome please make a new topic for your question, we like to have one topic for each problem and not mix questions into existing topics.
[necro]CynicSynDrome[/necro]
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Who's a fan of firearms? The 5 on the bottom row (not including the green laser ones) I made pretty recently. I plan for most of these to be in my project.

Screenshot 2021-09-28 165924.png
Doing RPG Maker News for 28th September 2021

RMMV - Skip script errors:

For game developer testing purposes.
You know, I really get to farm likes since I post all of @Avery and @hiddenone 's blog tutorials on the forums...
Back from a very long hiatus with a new project woo
This is my battler placeholder image trying out art styles too I want to fake a backview battle system
I think I will want portraits and battle sprites to be 2D and stick to pixel art for overworld not 100%sure but pretty sure its easier to make pixel art for overworld sprites, events and maps and stuff.
Placeholder.png

Forum statistics

Threads
115,441
Messages
1,089,937
Members
150,221
Latest member
1lamv
Top