daily pastebin goal
17%
SHARE
TWEET

Actor Stepping Animation (MV)

ezmash Oct 24th, 2015 (edited) 1,302 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // Actor Stepping Animation
  3. // by Shaz
  4. // Last Updated: 2015.10.30
  5. //
  6. // Revisions:
  7. // 2015.10.30 Fixed TypeError: Cannot read property 'actor' of undefined.
  8. //=============================================================================
  9.  
  10. /*:
  11.  * @plugindesc Allows party leader/followers to have stepping anim on map
  12.  * @author Shaz
  13.  *
  14.  * @help This plugin does not provide plugin commands.
  15.  *
  16.  * Add <stepanim> to the note box of an Actor to turn on stepping animation
  17.  * for the actor's sprite on the map, as the party leader or a follower.
  18.  *
  19.  */
  20.  
  21. (function() {
  22.   var _Game_Player_update = Game_Player.prototype.update;
  23.   Game_Player.prototype.update = function(sceneActive) {
  24.     _Game_Player_update.call(this, sceneActive);
  25.     if ($gameParty.leader()) {
  26.       this.setStepAnime($gameParty.leader().actor().meta.stepanim || false);
  27.     }
  28.   };
  29.  
  30.   var _Game_Follower_update = Game_Follower.prototype.update;
  31.   Game_Follower.prototype.update = function() {
  32.     _Game_Follower_update.call(this);
  33.     if (this.actor()) {
  34.       this.setStepAnime(this.actor().actor().meta.stepanim || false);
  35.     }
  36.   };
  37. })();
RAW Paste Data
Top