Checking a variable in a plugin based on the actor's ID

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

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
You haven't given any context - where is this script being run? What is this? What's in that variable, and how/when does the value change?
Is there a way to load actor default database face instead of pngs?
Necro-post notice: KravenarGames

You are also hijacking a thread. I suggest you start a new thread and give fuller details so that people will have some context for what you are asking.

Moderator note: Closing, as it appears the OP solved the query.

Original thread: https://forums.rpgmakerweb.com/threads/checking-a-variable-in-a-plugin-based-on-the-actors-id.86898/