Check out my MV plugins under utilities!
Quest for SOFA
Help our heroes find their greatest treasure, the SOFA.


Resolved: My function call isn't working

I'm trying to write a simple plugin and when I got it running, it was causing my characters to freeze in place. I narrowed at least one problem down to this code. If I make a plugin exactly as this, it causes the character to freeze.

(function() {

var _Game_CharacterBase_canPass = Game_CharacterBase.prototype.canPass;
Game_CharacterBase.prototype.canPass = function(x, y, d) {, x, y, d);

Now this should be the basic format for copying a function into a variable and running it, with additional code added on. It works everywhere else.

The way this function works is that it returns false if the character can't pass, and returns true if they can. Could that cause a problem? I've experimented with several things and I can't find an answer.

Is it possible to change enemy stats on the fly? [SCRIPTING] [RMMV]

I've hit a wall trying to figure out how to change the stats of a particular enemy from battle. I've found that I can call up an enemy's stats to be viewed, for example I can see the agility of the first enemy in a battle using either $gameTroop.members().param(6) or $gameTroop.members().agi

However, when I try to assign these, first from a script as above and then (thinking it was a scope problem) from a plugin that creates a function within Game_Troop, when the game isn't crashing it seems to be ignoring the command. This function, for example, seems to do nothing at all when called:

Game_Troop.prototype.agilityup = function() {
this.members().agi = 14

Thanks for any help you can provide.
Pages: 1