Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*:
- * @target MZ
- * @plugindesc [v1.0] [en] Stop Event and Player move for event menu.
- * [fr] Arrêter les déplacements des Events et du Joueur pour les Event Menu.
- * @author Keiner
- *
- * @help
- ====================================================
- * Introduction
- ====================================================
- /!\ NE PAS PARTAGER SANS MON ACCORD
- * Si vous voullez vous pouvez me créditer dans votre projet.
- * Ce plugin est gratuit pour son utilisation.
- Ce plugin permet d'arrêter les déplacements des events et
- du joueur.
- ====================================================
- * UTILISATION DU PLUGIN
- ====================================================
- * Veuiller mettre l'id de l'interrupteur a utiliser,
- * a droite dans les paramétres.
- * Vous avez seulement a activer/désactiver l'interrupteur
- * en jeu, pour activer/désactiver les déplacements des
- * events et du joueur.
- * @param switch
- * @type number
- * @text ID Switch
- * @desc Set id switch for on/off move event and player.
- * @default 5
- *
- */
- var Keiner = Keiner || {};
- const pluginNameKDonMove = document.currentScript.src.match(/.+\/(.+)\.js/)[1];
- Keiner.donMoveSwitch = PluginManager.parameters(pluginNameKDonMove)['switch'];
- /*
- [fr] Arrête les events sur la carte.
- [en] Stop move event on the map.
- */
- Game_Map.prototype.updateEvents = function() {
- if ($gameSwitches.value(Keiner.donMoveSwitch) !== true) {
- for (const event of this.events()) {
- event.update();
- }
- }
- for (const commonEvent of this._commonEvents) {
- commonEvent.update();
- }
- };
- /*
- [fr] Arrête le déplacement du héro.
- [en] Stop move player on the map.
- */
- Game_Player.prototype.update = function(sceneActive) {
- const lastScrolledX = this.scrolledX();
- const lastScrolledY = this.scrolledY();
- const wasMoving = this.isMoving();
- this.updateDashing();
- if (sceneActive & $gameSwitches.value(Keiner.donMoveSwitch) !== true) {
- this.moveByInput();
- }
- Game_Character.prototype.update.call(this);
- this.updateScroll(lastScrolledX, lastScrolledY);
- this.updateVehicle();
- if (!this.isMoving()) {
- this.updateNonmoving(wasMoving, sceneActive);
- }
- this._followers.update();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement