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

Status
Not open for further replies.

EFizzle

Rum aficionado
Veteran
Joined
Mar 14, 2012
Messages
294
Reaction score
61
First Language
English
Primarily Uses
N/A
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
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,969
Reaction score
13,603
First Language
English
Primarily Uses
RMMV
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?
 

KravenarGames

Veteran
Veteran
Joined
Feb 19, 2017
Messages
129
Reaction score
15
First Language
English
Primarily Uses
N/A
Is there a way to load actor default database face instead of pngs?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,290
Reaction score
11,696
First Language
English
Primarily Uses
RMVXA
[necro]KravenarGames[/necro]

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.

[mod]Closing, as it appears the OP solved the query.[/mod]
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

We are truly intellectuals.
Without using violence without weapons
Our group has as many as 1.3 million people and more than 1 hundred thousand talks.
We gathered in an hour, more than 4.5 Half a hundred thousand



I got a Sword.
I got an Axe.
I got two Swords.
Nothing to see here, just walking with my dog.
I haven’t worked on my game in a while. Tomorrow might be the day.
*squeals* :kaoblush:


I've been experimenting with improved memory management again, which allowed me to include items to increase player path length. These are both 44 grid spaces long, and stable. :LZSexcite:
I FINALLY DID IT! 5 years making my very first game and I just officially released it on STEAM..... OMG..... I can say I finished a game! The feelings!!!!!

Forum statistics

Threads
104,463
Messages
1,006,474
Members
135,971
Latest member
Akasheee
Top