Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // SilvStamina_GV.js
- // Version: 1.01
- //=============================================================================
- /*:
- * @plugindesc v1.01 Addon script for my dash-script to store stamina in a gamevariable
- <SilverStamina_GameVariable>
- * @author Silver
- *
- * @param Game Variable Number
- * @desc Must be 1 or higher.
- * @default 1
- *
- * @help
- * Required Silvers Dash Stamina and must be placed below it.
- *
- */
- // Imported
- var Imported = Imported || {};
- Imported.SILV_SilvStamina_GV = 1.01;
- // #Parameters
- var Silv = Silv || {};
- Silv.Parameters = $plugins.filter(function(p) { return p.description.contains('<SilverStamina_GameVariable>'); })[0].parameters;
- Silv.DashStamina_GV = Silv.DashStamina_GV || {};
- Silv.DashStamina_GV.StaminaGVNumber = parseInt(Silv.Parameters['Game Variable Number']);
- // Dependency Check
- if (!('Silv_DashStamina' in Imported) || Imported.Silv_DashStamina < 1.03) { throw Error('ERROR: Silvers Stamina GV requires Silvers Dash Stamina v1.02 or higher. It must be placed above this script.'); }
- (function()
- {
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Script
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- var silv_alias_dashStamina_GV_Game_Map_update = Game_Map.prototype.update;
- Game_Map.prototype.update = function(sceneActive)
- {
- silv_alias_dashStamina_GV_Game_Map_update.call(this, sceneActive);
- if (sceneActive) { $gameVariables.setValue(Silv.DashStamina_GV.StaminaGVNumber, $gamePlayer.dashStamina); }
- };
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- })();
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // This is the end of this awesome script!
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Add Comment
Please, Sign In to add comment