Hello. I'm trying to make a custom item menu with "Show Choices" command. I want to make it somehow to remember exactly what item was used just so player wouldn't have to scroll again if he needs to use that item again, as well as to make it possible to use an item without opening a menu again (most of my items are just common events).
After some forum browsing i found nothing, so i tried to implement it via script.
It works, but creates another problem. I'm no good with javascript. I have no idea how to script the choices themself. I assume i will have to just make a branching choice with the '101' variable, but there should be some easier way to do it probably? Also, if using this script, how can i hide certain choices? Like, can i hide a "B" option if some switch is turned off? It's a menu script after all, so this is key thing for it. Thank you for reading this!
After some forum browsing i found nothing, so i tried to implement it via script.
Code:
$gameMessage.setChoices(['A', 'B', 'C'], $gameVariables.value(101), -2);
$gameMessage.setChoiceBackground(2);
$gameMessage.setChoicePositionType(0);
$gameMessage.setChoiceCallback(n => {
$gameVariables.setValue(101, n);
});
this.setWaitMode('message');