Remove Mouse Feature

Arisete™

Creator
Veteran
Joined
Jul 14, 2012
Messages
231
Reaction score
61
First Language
English
Primarily Uses
RMMV
Is there a way to remove the mouse feature in MV?
as in, it's probably in one of the core scripts.

The reason I ask this is because there's now starting to
be Plugins that do different things with movements and stuff, and most have issues with
the mouse.

Not only that, my projects are going to be on Windows only using (Keyboard/Joypad) controls.
I want the mouse system disabled completely.

P.S: Not sure if this is the right section for this type of post.
Wasn't sure if I should post it here or in JS Request's since the
Mouse system might have something to do with the core script.
 

Zarby

Veteran
Veteran
Joined
Dec 16, 2012
Messages
42
Reaction score
25
First Language
French
Primarily Uses
i don't know if it a good way to do it but you can disable the mouse update it will disable mouse :

you can even call it from a event

Code:
TouchInput.update = function() {}
 

Osoni

Villager
Member
Joined
Jan 3, 2013
Messages
13
Reaction score
0
First Language
English
Primarily Uses
Very handy, thanks! What would the command be to enable mouse support again?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
To be able to turn it on/off on request, you would need to do something slightly different.

Try this, in a new plugin slot (any name):

var _TouchInput_initialize = TouchInput.initialize;TouchInput.initialize = function() { _TouchInput_initialize.call(this); this._touchEnabled = true;}var _TouchInput_update = TouchInput.update;TouchInput.update = function() { if (this._touchEnabled) _TouchInput_update.call(this);}TouchInput.enable = function() { this._touchEnabled = true;}TouchInput.disable = function() { this._touchEnabled = false; TouchInput.clear();}then just do a script call as follows:
Code:
TouchInput.enable()
Code:
TouchInput.disable()
(note, I have not tested this - post back if you try it and get errors)
 
Last edited by a moderator:

Osoni

Villager
Member
Joined
Jan 3, 2013
Messages
13
Reaction score
0
First Language
English
Primarily Uses
Works great! Thanks for the quick reply!
 

Platoon666

Villager
Member
Joined
Jan 21, 2013
Messages
7
Reaction score
2
First Language
English
Primarily Uses
To be able to turn it on/off on request, you would need to do something slightly different.


Try this, in a new plugin slot (any name):



var _TouchInput_initialize = TouchInput.initialize;TouchInput.initialize = function() { _TouchInput_initialize.call(this); this._touchEnabled = true;}var _TouchInput_update = TouchInput.update;TouchInput.update = function() { if (this._touchEnabled) _TouchInput_update.call(this);}TouchInput.enable = function() { this._touchEnabled = true;}TouchInput.disable = function() { this._touchEnabled = false; TouchInput.clear();}


then just do a script call as follows:



TouchInput.enable()

Code:
TouchInput.disable()

(note, I have not tested this - post back if you try it and get errors)


I'm sorry for bothering Shaz, but this does not seem to work for me.


I created a new plugin and pasted your code on it, but when I try to do script calls in events with TouchInput.disable() I get a "TypeError: undefined is not a function". Is there something I'm missing here? Thanks!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
stupid forum code reformatting!


@Platoon666 this is what your plugin should look like:


var _TouchInput_initialize = TouchInput.initialize;
TouchInput.initialize = function() {
_TouchInput_initialize.call(this);
this._touchEnabled = true;
}

var _TouchInput_update = TouchInput.update;
TouchInput.update = function() {
if (this._touchEnabled)
_TouchInput_update.call(this);
}

TouchInput.enable = function() {
this._touchEnabled = true;
}

TouchInput.disable = function() {
this._touchEnabled = false;
TouchInput.clear();
}


If you try that and it doesn't work, please go into the console and provide a screenshot or copy/paste of the log with the additional error info.
 

Platoon666

Villager
Member
Joined
Jan 21, 2013
Messages
7
Reaction score
2
First Language
English
Primarily Uses
stupid forum code reformatting!


@Platoon666 this is what your plugin should look like:



var _TouchInput_initialize = TouchInput.initialize;
TouchInput.initialize = function() {
_TouchInput_initialize.call(this);
this._touchEnabled = true;
}

var _TouchInput_update = TouchInput.update;
TouchInput.update = function() {
if (this._touchEnabled)
_TouchInput_update.call(this);
}

TouchInput.enable = function() {
this._touchEnabled = true;
}

TouchInput.disable = function() {
this._touchEnabled = false;
TouchInput.clear();
}


If you try that and it doesn't work, please go into the console and provide a screenshot or copy/paste of the log with the additional error info.
Yep, that was it! It's working flawless now. Thanks for the quick reply Shaz!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top