Sprite_Character.prototype.updateFrame = function() { if (this._character instanceof Game_Player) { this.updatePlayerFrame(); } else if (this._character instanceof Game_Event) { this.updateEventFrame(); };};Sprite_Character.prototype.updateEventFrame = function() { var pw = this.patternWidth(); var ph = this.patternHeight(); var sx = (this.eventBlockX() + this.characterPatternX()) * pw; var sy = (this.characterBlockY() + this.characterPatternY()) * ph; this.setFrame(sx, sy, pw, ph);};Sprite_Character.prototype.eventBlockX = function() { return eventBlockX;};Game_CharacterBase.prototype.changeIndex = function(BlockX, MaxPattern) { if (this instanceof Game_Player) { playerBlockX = BlockX; playerMaxPattern = MaxPattern; } else { eventBlockX = BlockX; eventMaxPattern = MaxPattern; };};I am using long sprite sheets, 8 x 32, and I was trying to make a script call to change the characters image (blockX).
Game_CharacterBase.prototype.changeIndex = function(BlockX, MaxPattern) works for the player but when I use on an event it changes all the events because they are all linked to 'eventBlockX'. I have been trying to use 'this._character.eventId()' as a function parameter to only update the event that contains the script call but I cannot get it to work. I am wondering if anyone can throw me a bone here. Many hours. Many hairs lost. Thanks in advance.
Game_CharacterBase.prototype.changeIndex = function(BlockX, MaxPattern) works for the player but when I use on an event it changes all the events because they are all linked to 'eventBlockX'. I have been trying to use 'this._character.eventId()' as a function parameter to only update the event that contains the script call but I cannot get it to work. I am wondering if anyone can throw me a bone here. Many hours. Many hairs lost. Thanks in advance.