Set Actor Character Image...?

Sorry if this is in the wrong section, Im very new to posting here: So in my project, i have many combinations of clothing and body sizes.

I was given this code that changes the character Image to the set combination
by declaring some variables and calling the filename that is associated with that combination. Ive done it through a ton of if statements but I want to make it easier with script;

When they choose SKintone ( either dark medium or light) the skintone variable then = EX: $dark, when they choose hipsize (*small, medium, large) then the hips_size = Small_Hips_

then so on an so forth with each variable. it will eventually add up to $Dark_Small_Hips_ <-- that would be the filename its looking for ( I have the image named that already)

Here is what i have so far. The problem is it won't change the character image. Im not sure what im doing wrong.
changecharacterimage.jpg
The top looks wrong. What is the value of all these other variables, and why are you adding them to 111-114?

And then your script call is also wrong - what is "index"? The code is expecting a number there.
The top looks wrong. What is the value of all these other variables, and why are you adding them to 111-114?

And then your script call is also wrong - what is "index"? The code is expecting a number there.
THis is some of my issue.

THIS is an example to see if the code will work. In the game you choose body types, skintones and clothing. Each choice is set in a variable. THen I need the change character image to pull up that variable combination and change the character image to that name.

Example:

Skintone choice = $Dark_
hipsize choice= Small_Hips_
Boob size = Small_Boob_
then it will eventually have makeup, outfit choice and hair choice.

Each of these are in a filename associated with that combination.

so this one would say $Dark_Small_Hips_Small_Boob_

i need the change characterImage to pull up that file.

as for the index I'm not sure how to define it
Replace actorId with the ID of the actor you want to affect, e.g. 1 for actor ID 1.

Replace index with 0, since it's a 1-character sheet (starts with $).

You also need "quotes" around your strings, e.g. "$Dark_". Otherwise JS thinks you mean a variable, so you'll get undefined instead.
In addition to what caethyril wrote, use the 'set' option in your control variables, instead of add.
Thank you so much, it worked.

Original thread: https://forums.rpgmakerweb.com/threads/set-actor-character-image.166912/