Help needed: Script call to specifically enable/disable mouse click 'Get On/Off' Vehicle

Elranzer

Warper
Member
Joined
Apr 17, 2022
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMZ
Hi everyone,

Been sifting the forum support for something that was similar to this script but found none.
Anyone able to share the script line specifically for

- Enable/Disable Mouse Click 'Get On/Off' Vehicle (mouseclick OK is fine too)

Appreciate if anyone can help me out!
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,339
Reaction score
3,376
First Language
EN
Primarily Uses
RMMZ
By default clicking on a vehicle just tells the game to move there, same as clicking on an event or an empty tile. When the player stops moving, the game does some checks. One of these is a "touch action" check, which splits into "here" (same tile), "there" (1 tile in front), or "over counter" (2 tiles in front). If the touch-move destination matches one of these tiles, it'll try an appropriate action: trigger event or get on/off vehicle.

You'd need a plugin to change this. Examples (save as a .js file and import as a plugin):
JavaScript:
/*:
 * @target MZ
 * @plugindesc Disable map movement via touch controls.
 * @help Free to use and/or modify for any project, no credit required.
 */
// Override!
Game_Temp.prototype.setDestination = function() {};
JavaScript:
/*:
 * @target MZ
 * @plugindesc Disable event/vehicle interactions via touch controls.
 * @help Free to use and/or modify for any project, no credit required.
 */
// Override!
Game_Player.prototype.triggerTouchAction = function() {};
I'd suggest the first one: disable touch movement. That also disables event/vehicle interactions.

(If you're already using a plugin to change how touch controls are handled, then these options might not work for you.)
 

Elranzer

Warper
Member
Joined
Apr 17, 2022
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMZ
Thank you very much Caethyril.
This indeed can solve my problems.
 

Marquise*

Veteran
Veteran
Joined
Jul 9, 2014
Messages
5,162
Reaction score
8,416
First Language
French-Canadian
This will also solve a problem in my one map.
 

Latest Threads

Latest Posts

Latest Profile Posts

That moment when I am listening to another instructor teach and I am thinking…I have been doing this for almost 30 years…I know this material…I teach this material…and you are confusing the crap out of me…let alone the students. What the actual $&@#! are you talking about? :eek:
Help me make a choice. Which one makes more sense?
A. Range style 1.pngDiamond shape
B.Range style 2.png Square shape
I created a skill that can only be used if there are enemies within the player's range. When the player's range is 2, which one do you think is more appropriate to describe the range area?
Just once I would like to see some innocent person stumble upon a body in a crime show and instead of scream they sigh and just say, "Found another one."
Can we get like a RPGM VXA Pro edition with all the limits gone!!
I drew @TheoAllen 's Cecilia~

yVLlTmK.png

Forum statistics

Threads
128,358
Messages
1,193,873
Members
168,852
Latest member
xSeggy
Top