Hey y'all -- I've been working on making some edits to the Character Creator EX plugin. This is one of the last things I need to figure out, so if you're able to help me with it, I'd be tremendously grateful!
What I'm trying to do is simply: when the player selects a certain piece of a certain section, I'd like to set a variable to a certain value. This should, in theory, then unhide certain folders, since I have them set up so that they'll show in the Character Creator if a condition is met (i.e. if variable 64 = 2, for example).
I have been able to make this work, but only if I run the script outside of the CharacterCreator scene. So, how can I make something like this run inside the CharacterCreator scene?
This is a truncated version of all the if statements I need to run -- I have 9 bodies for the player to choose from! But if I can get this implemented and working, then I can easily add in the rest of the bodies and the appropriate variable numbers for them.
Also, you can see the entire code for the Character Creator plugin here (just click View)! In case that helps anyone who's willing to help me out with this! I'm not sure where in the plugin I need to run this code, and if any other changes need to be made in order for it to be executed.
Thanks a million!
What I'm trying to do is simply: when the player selects a certain piece of a certain section, I'd like to set a variable to a certain value. This should, in theory, then unhide certain folders, since I have them set up so that they'll show in the Character Creator if a condition is met (i.e. if variable 64 = 2, for example).
I have been able to make this work, but only if I run the script outside of the CharacterCreator scene. So, how can I make something like this run inside the CharacterCreator scene?
JavaScript:
if $gameCharacterCreations.getInfo(1).Body.file == 'Body (1)' {
$gameVariables.setValue(64, 1);
$gameVariables.setValue(65, 1);
$gameVariables.setValue(66, 1);
} else if $gameCharacterCreations.getInfo(1).Body.file == 'Body (2)' {
$gameVariables.setValue(64, 2);
$gameVariables.setValue(65, 1);
$gameVariables.setValue(66, 2);
} else if $gameCharacterCreations.getInfo(1).Body.file == 'Body (3)' {
$gameVariables.setValue(64, 3);
$gameVariables.setValue(65, 1);
$gameVariables.setValue(66, 2);
} else $gameCharacterCreations.getInfo(1).Body.file == 'Body (4)' {
$gameVariables.setValue(64, 4);
$gameVariables.setValue(65, 2);
$gameVariables.setValue(66, 3);
}
This is a truncated version of all the if statements I need to run -- I have 9 bodies for the player to choose from! But if I can get this implemented and working, then I can easily add in the rest of the bodies and the appropriate variable numbers for them.
Also, you can see the entire code for the Character Creator plugin here (just click View)! In case that helps anyone who's willing to help me out with this! I'm not sure where in the plugin I need to run this code, and if any other changes need to be made in order for it to be executed.
Thanks a million!