Hi all!
im making some show choices by script call. Everything works except I dont wan to get the index of the choice but the name:
I found this code on a post:
So I know that responseIndex will get me the index of the choice made, but what if want to handle my if else statements by name? Like :
I need the name of the choice since I'm hiding and showing choices, so index is no bueno.
Thank you!!
im making some show choices by script call. Everything works except I dont wan to get the index of the choice but the name:
I found this code on a post:
Code:
choices = []; params = [];
$gameMessage.setChoices(choices, 0)
choices.push("Yes");
choices.push("No");
params.push()
$gameMessage.setChoiceCallback(function(responseIndex) {
if (responseIndex === 0) {
// Player chose "Yes"
$gameScreen.startFlash([250, 250, 250, 100], 60);
} else {
$gameScreen.startFlash([0, 0, 250, 100], 60);
}
});
So I know that responseIndex will get me the index of the choice made, but what if want to handle my if else statements by name? Like :
Code:
if (NAME == "Yes") {
bla bla
}
Thank you!!