Picture Common Events (YEP)
This is a plugin created for RPG Maker MV.
For help on how to install plugins, click here.
For help on how to update plugins, click here.
Got errors with your RPG Maker MV plugin? Click here.
This plugin is a part of the Yanfly Engine Plugins library.
Pictures can function as something other than just a visual for your game. They can sometimes serve as UI elements or more! However, what they don't have the ability to inherently do is to call upon common events when clicked on by the mouse. With this plugin, the pictures bound to a common event will become usable when clicked or touched!
In the plugin's parameters, you can set common event ID's to each picture ID listed from 1 to 100 (max number of pictures used in RPG Maker MV is 100). If the picture is has even a value of 1 opacity, that picture can be used for a common event. There are four condition types that can be bound with the common events: --- - CLICK - If the picture is clicked upon, this will prompt the common event to trigger if the common event value listed is above 0. This will trigger only once until the player releases the mouse (or stops touching the screen). - REPEAT - If the mouse is clicked and then held (or if the touch screen is pushed and held), as long as the mouse is above the picture area and the common event value listed is above 0, then this will trigger once every 6 frames until the player releases the mouse (or stops touching the screen) or moves the mouse outside of the picture boundaries. - HOLD - If the mouse is clicked and then held (or if the touch screen is pushed and held), as long as the mouse is above the picture area and the common event value listed is above 0, then this will trigger every frame until the player releases the mouse (or stops touching the screen) or moves the mouse outside of the picture boundaries. - RELEASE - Upon releasing the clicked mouse (or the moment the player stops touching the screen) and releases the mouse above this picture and if the picture's common event value listed is above 0, then this will trigger upon release. --- Note that there are some behavioral changes in regards to pictures bound to that of common events. Any picture that's bound to a common event will be separate from the map's spriteset, and instead, bound to the scene. This is so that in the event the screen is scrolled, zoomed in, shakes, etc., it will NOT affect the bound pictures. This is because the pictures are generally to be used as UI elements and UI elements best work under the practice that they do not change position.
Here is a list of Plugin Command(s) that you may use:
The following are some plugin commands you can use should you want to add a bit of control with the Picture Common Events. Plugin Command EnableTouchMove DisableTouchMove - Allows the player to press a destination on the screen and move there or disables the player from using touch movement. HidePictureCommonEvents ShowPictureCommonEvents - Manually hide all pictures bound to common events or show them. If shown then pictures will return to their previous opacity value. Hidden pictures cannot be triggered to activate common events. MovePlayer Down MovePlayer Left MovePlayer Right MovePlayer Up - Will cause the player character to move as if moving by using a 4-dir input (either via keyboard or controller). This is best used with 'Press'. TriggerButton Ok TriggerButton Cancel TriggerButton Dash TriggerButton PageUp TriggerButton PageDown TriggerButton Left TriggerButton Up TriggerButton Right TriggerButton Down - This will cause the game to simulate triggering the button command of one of those original functions even if there is a common event bound to all of the keys of that original function.
Version 1.06: - Updated for RPG Maker MV version 1.5.0. Version 1.05: - Added bug fixes found by Splendith: - Bug fixed for events that allow the player to move immediately after pressing the picture common event. - Bug fixed for 'HidePictureCommonEvents' and 'ShowPictureCommonEvents' plugin command that caused normal pictures to hide/show, too. Version 1.04: - Fixed a bug that caused the 'HidePictureCommonEvents' plugin command to not function properly. Version 1.03: - Disabling Touch Move now also disables the Right Click button and on-screen Two Finger tap to prevent random menu calls. Version 1.02: - Fixed a bug that prevented the MovePlayer commands from working without a dependency on the YEP_RegionEvents plugin. Version 1.01: - Changed this plugin's Imported setting to YEP_PictureCommonEvents. Version 1.00: - Finished Plugin!