(Sorry for bad english. Also sorry if maybe I unknowingly breaking some rule.)
I want to show full body of character/another image rather than just face of friend actor in Moogle_X's Actor Friendship System plugin (RPG Maker MV). This is the object I'm interested to edit.
Window_ActorsFriendship.prototype.drawItemImage = function(index) {
if (!Moogle_X.AFS.showFace) return;
var rect = this.itemRect(index);
this.drawActorFace(this._data[index], rect.x + 1 + Moogle_X.AFS.faceOffsetX, rect.y + 1 + Moogle_X.AFS.faceOffsetY, 144, rect.height - 2);
this.changePaintOpacity(true);
};
I type
ImageManager.teman = function(filename) {
return this.loadBitmap('img/pictures/', filename, 0, true);
};
above that object. Then I changed drawActorFace to ImageManager and new Sprite like this:
var nomer = this._data[index];
var act = ImageManager.teman("Actor_" + nomer);
this._tmn = new Sprite(act);
this._tmn.x = 500;
this._tmn.y = Graphics.boxHeight;
the problem is, it seems this._data[index] doesn't return the actor id of that friend, that's why the system always failed to load the pic (the error message was Failed to load: img/pictures/Actor_[object Object].png)
So, how do I do to make the variable read the actor id of the friends?
I want to show full body of character/another image rather than just face of friend actor in Moogle_X's Actor Friendship System plugin (RPG Maker MV). This is the object I'm interested to edit.
Window_ActorsFriendship.prototype.drawItemImage = function(index) {
if (!Moogle_X.AFS.showFace) return;
var rect = this.itemRect(index);
this.drawActorFace(this._data[index], rect.x + 1 + Moogle_X.AFS.faceOffsetX, rect.y + 1 + Moogle_X.AFS.faceOffsetY, 144, rect.height - 2);
this.changePaintOpacity(true);
};
I type
ImageManager.teman = function(filename) {
return this.loadBitmap('img/pictures/', filename, 0, true);
};
above that object. Then I changed drawActorFace to ImageManager and new Sprite like this:
var nomer = this._data[index];
var act = ImageManager.teman("Actor_" + nomer);
this._tmn = new Sprite(act);
this._tmn.x = 500;
this._tmn.y = Graphics.boxHeight;
the problem is, it seems this._data[index] doesn't return the actor id of that friend, that's why the system always failed to load the pic (the error message was Failed to load: img/pictures/Actor_[object Object].png)
So, how do I do to make the variable read the actor id of the friends?