Disabling walking when holding left click down?

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
206
Reaction score
114
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
452
Reaction score
155
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
30,441
Reaction score
7,238
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.

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

Latest Threads

Latest Posts

Latest Profile Posts

So dragonbones getting laggy xD
I even removed the fingers armatures.

Have to remake this guy after crashing ( corrupted file).
:rtear:

Although limited to only this shop for room decorations, I like this aspect for previewing items.
So yesterday I got a follower (follow my NSFW art account) who dmed me and said to me :
if you continue to be friends with [name of the artists] which make me uncomfortable I will have to unfollow and I am like :
... do it?
Did I add too many?? Is there such a thing?

Rabbit's Shop I've been reworking. Still some dated graphics but 99% satisfied I think.:kaophew:

Forum statistics

Threads
100,834
Messages
980,075
Members
132,482
Latest member
Smyles85
Top