I'm a total scrub with JavaScript so bear with me here, like I don't know anything about the language.
I want to use a variable based on an actor's ID and use the value of that variable to load an image. So basically what I want in game is I'd change that variable's value to get a different image named after the actor's ID and the variable's value.
I'm using Moghunter's status menu for this, and this is the line that does the loading, I want to know how I'd edit this to add in another + "_" + VariableThingy, yeah
This make sense?
OKAY NEVERMIND I THINK I SOLVED IT
Here's how I did it was like this
Is there a better way of doing this? I'm not sure if it'll cause any bugs or not
I want to use a variable based on an actor's ID and use the value of that variable to load an image. So basically what I want in game is I'd change that variable's value to get a different image named after the actor's ID and the variable's value.
I'm using Moghunter's status menu for this, and this is the line that does the loading, I want to know how I'd edit this to add in another + "_" + VariableThingy, yeah
Code:
this._bust.bitmap = ImageManager.loadMenusFaces4("Actor_" + this._actor._actorId);
This make sense?
OKAY NEVERMIND I THINK I SOLVED IT
Here's how I did it was like this
Code:
var newOutfit= $gameVariables.value(this._actor._actorId);
this._bust.bitmap = ImageManager.loadMenusFaces4("Actor_" + this._actor._actorId + "_" + newOutfit);
Is there a better way of doing this? I'm not sure if it'll cause any bugs or not