Author: Pheonix KageDesu
RPG Maker Versions: MZ, MV
URL: https://kdworkshop.net/plugins/mobile-controls
This plugin adds simple mobile controls for RPG Maker games:
- Joystick for movement
- Custom screen buttons for calling common events
Use these in the Script Call On Click setting for a button:
PKD_MobileControls.simulateAction(); // Simulates Enter key press
PKD_MobileControls.simulateCancel(); // Simulates Esc key press
PKD_MobileControls.simulateJump(); // Simulates a 1-tile forward jump
Check if a button is currently pressed:
IsMCButtonIsPressed(INDEX);
Returns TRUE
if the button with the specified INDEX
is being pressed.
PKD_MobileControls.HideAll(); // Hides joystick and all buttons
PKD_MobileControls.ShowAll(); // Shows joystick and all buttons
You can control the visibility of mobile controls elements based on the current scene. You can create buttons that are only visible in specific scenes, like the game menu or battle screen.
Edit parameter Scenes Visibility Filter
, you will find it inside the buttons and joystick parameters.
Note: By default, all elements are visible only on the map scene. You can set visibility for certain scenes or for all scenes except certain scenes.
-
Set
Visible on Other Scenes?
totrue
to make the element visible in all scenes except those specified in theVisible except in Scenes
. -
Or set
Visible on Other Scenes?
totrue
and specify the scenes names where the element should be visible in theVisible only in Scenes
parameter.
Open the console in your browser (F12 or F8) and type:
SceneManager._scene.constructor.name
Use the following format:
MC Joystick COMMAND
MC Button INDEX COMMAND
COMMAND
:enable
,disable
,hide
,show
INDEX
: The button index (starting from 1) as defined in the plugin parameters
MC Joystick hide
MC Button 1 disable
MZ provides Plugin Commands for controlling joystick and buttons. You can show/hide or enable/disable them during gameplay.
A custom question window that:
-
Displays an optional question
-
Has two buttons only:
- First: Always confirms (OK)
- Second: Always cancels
-
⚠️ Only works for choices with exactly 2 options and cancel enabled
Use the Plugin Command: Quick Question
Use this script call:
QuickQuestion("Your question text here");
The next Show Choices command will be handled as a Quick Question.
SetQuickQButtons("OK_IMAGE", "CANCEL_IMAGE");
Place two image files per button in the pictures/
folder:
OK_IMAGE_00.png
andOK_IMAGE_01.png
(hover state)CANCEL_IMAGE_00.png
andCANCEL_IMAGE_01.png
Example:
SetQuickQButtons("mcButtonYes", "mcButtonNo");
SetQuickQBackground("IMAGE_NAME");
The image must be placed in the pictures/
folder.
Example:
SetQuickQBackground("customBackgroundImage");
SetQuickQButtons
andSetQuickQBackground
must be called afterQuickQuestion
.- Every time
QuickQuestion()
is called, settings reset to default plugin parameters.