My question is simple, but I haven't found the answer yet.
I am developing a method that changes an Actor's combat chart according to the type of weapon he has equipped, by placing a suffix on the sprites.
For example:
If equipped with weapon type ID: 1, the graphic would be "Actor_1", if equipped with weapon type ID: 7, the graphic would be "Actor_7".
I have already found the lines of code that allow me to use the suffixes that I mentioned.
However, I have not found which code I use to return the value of the type of weapon the actor is equipped with.
Which line of code should I use to return the equipped weapon type value to enter in the "var name"?
I am developing a method that changes an Actor's combat chart according to the type of weapon he has equipped, by placing a suffix on the sprites.
For example:
If equipped with weapon type ID: 1, the graphic would be "Actor_1", if equipped with weapon type ID: 7, the graphic would be "Actor_7".
I have already found the lines of code that allow me to use the suffixes that I mentioned.
JavaScript:
Sprite_Actor.prototype.updateBitmap = function() {
Sprite_Battler.prototype.updateBitmap.call(this);
var name = this._actor.battlerName() + "_" + WeaponTypeId; //This Line!
if (this._battlerName !== name) {
this._battlerName = name;
this._mainSprite.bitmap = ImageManager.loadSvActor(name);
}
};
However, I have not found which code I use to return the value of the type of weapon the actor is equipped with.
Which line of code should I use to return the equipped weapon type value to enter in the "var name"?