Advertisement
ezmash

Change Event Settings (MV)

May 30th, 2016
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // Change Event Settings
  3. // by Shaz (conversion of Ace script for TechnoNinja)
  4. // Last Updated: 2016.05.31
  5. //
  6. //=============================================================================
  7.  
  8. /*:
  9.  * @plugindesc Allows change of event graphic, priority and movement settings
  10.  * @author Shaz
  11.  *
  12.  * @help
  13.  *
  14.  * Call one of the following in a Script command (not a plugin command):
  15.  * page_graphic(ev, page, graphic, index)
  16.  *    to change the graphic on an event's page
  17.  * page_priority(ev, page, priority)
  18.  *    to change a page's priority
  19.  * page_move(ev, page, speed, freq, type)
  20.  *    to change the momvement options of a page
  21.  *
  22.  */
  23.  
  24.  (function() {
  25.    Game_Interpreter.prototype.page_graphic = function(ev, page, graphic, index = 0) {
  26.      $gameMap.event(ev).page_graphic(page, graphic, index);
  27.    }
  28.  
  29.    Game_Interpreter.prototype.page_priority = function(ev, page, priority) {
  30.      $gameMap.event(ev).page_priority(page, priority);
  31.    }
  32.  
  33.    Game_Interpreter.prototype.page_move = function(ev, page, speed, freq, type = null) {
  34.      $gameMap.event(ev).page_move(page, speed, freq, type);
  35.    }
  36.  
  37.    Game_Event.prototype.page_graphic = function(page, graphic, index) {
  38.      this.event().pages[page].image.characterName = graphic;
  39.      this.event().pages[page].image.characterIndex = index;
  40.      this.setupPageSettings();
  41.    }
  42.  
  43.    Game_Event.prototype.page_priority = function(page, priority) {
  44.      this.event().pages[page].priorityType = priority;
  45.      this.setupPageSettings();
  46.    }
  47.  
  48.    Game_Event.prototype.page_move = function(page, speed, freq, type) {
  49.      this.event().pages[page].moveSpeed = speed;
  50.      this.event().pages[page].moveFrequency = freq;
  51.      if type { this.event().pages[page].moveType = type };
  52.      this.setupPageSettings();
  53.    }
  54.  })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement