Hi again! Still working on my game's character creation phase.
This time I need a way to have the character image change to X, where X is a variable that I get by combining various factors. That is, the player is prompted to make a few choices (sex, race, class). The combination of these choices should point to a unique sprite. I tried something really stupid: setting up a variable(x) to be = variable sex * variable race * variable class (I managed to make it so that the results are always different).
And then run this script
but it obviously results in an error where "filename.match is not a fuction".
Is there any way to script this shortcut, or do I have to write like 40 different if/else branches for each unique combination? Thank you!
This time I need a way to have the character image change to X, where X is a variable that I get by combining various factors. That is, the player is prompted to make a few choices (sex, race, class). The combination of these choices should point to a unique sprite. I tried something really stupid: setting up a variable(x) to be = variable sex * variable race * variable class (I managed to make it so that the results are always different).
And then run this script
Code:
$gameVariables.setValue(11, $gameVariables.value(9) * $gameVariables.value(6) * $gameVariables.value(5));
$gameActors.actor($gameVariables.value(7)).setCharacterImage($gameVariables.value(11), 0);
$gameActors.actor($gameVariables.value(7)).setFaceImage($gameVariables.value(11), 0);
$gameActors.actor($gameVariables.value(7)).setBattlerImage($gameVariables.value(11));
$gamePlayer.refresh();
Is there any way to script this shortcut, or do I have to write like 40 different if/else branches for each unique combination? Thank you!