Guest User

MID_LockFormationLeader

a guest
Feb 2nd, 2021
2,675
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //-----------------------------------------------------------------------------
  2. //  Midgardsormr's Lock Formation Leader MZ
  3. //-----------------------------------------------------------------------------
  4. //  For: RPGMAKER MZ
  5. //  MID_LockFormationLeader.js
  6. //-----------------------------------------------------------------------------
  7. //  2021-02-02 - Version 1.0 - release
  8. //-----------------------------------------------------------------------------
  9. //  Terms: CC BY 4.0 license -  https://creativecommons.org/licenses/by/4.0/
  10. //-----------------------------------------------------------------------------
  11.  
  12. var Imported = Imported || {};
  13. Imported.MID_LockFormationLeader = true;
  14.  
  15. var MID = MID || {};        // MIDGARDSORMR's main object
  16. MID.MID_LockFormationLeader = MID.MID_LockFormationLeader || {};
  17.  
  18. //-----------------------------------------------------------------------------
  19. /*:
  20.  * @plugindesc (v.1.0) Locks the first Actor in the formation (it cannot be swapped or replaced).
  21.  * @target MZ
  22.  * @author Midgardsormr
  23.  * ----------------------------------------------------------------------------
  24.  */
  25.  
  26.  // ALIAS
  27.  MID.MID_LockFormationLeader.gactor_isFormationChangeOk = Game_Actor.prototype.isFormationChangeOk;
  28.  
  29.  Game_Actor.prototype.isFormationChangeOk = function() {
  30.     return this.index() != 0 && MID.MID_LockFormationLeader.gactor_isFormationChangeOk();
  31. };
Advertisement
Add Comment
Please, Sign In to add comment