Disable a choice using Tsukihime's choice script

I'm using Tsukihime's choice script. I read the instructions within the reference, however, I am still unsure how to make a choice be disabled once the user has selected it.

 Method: disable_choice
 Effect: disables choice if condition is met
 Usage:  Takes a string representing a boolean statement. For example,
         "$game_actors[1].level > 5" means that the condition will only be
         selectable if actor 1's level is greater than 5.



So I have to use a string but, I am not sure which one to use that will indicate the choice was selected. Something with variables perhaps or a switch I can do? I am not sure what the statements for those would be though.


Ideally, what I want to do is have 2-4 choices the user can select. Once the choice is selected it will be greyed out. Then once all choices are selected (or sometimes the choice that I indicate) then it will go on to the next string of choices. So it is like having a conversation that goes deeper into more subjects and stuff. I'll also probably want to loop back to previous points in the conversation so the user can ask the questions he missed and so on, which is why it would be useful to disable some of the choices so he knows what has already asked.
no, you're wrong - if I remember correctly, the string needs to be the condition (which means it needs to be rgss code), the command itself is more than the string and indicates the position there.


Please give a link to the script on Tsukihime's website, then we can check the description there and tell you what you're missing here.


I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
http://himeworks.com/2013/03/choice-options/
I remembered correctly - look at the screenshot on the page you linked.


The complete command is (for example)


disable_choice(3,"$game_party.gold < 1000")


This means disable the choice number 3 when the party's gold is less than 1000
I remembered correctly - look at the screenshot on the page you linked.


The complete command is (for example)


disable_choice(3,"$game_party.gold < 1000")


This means disable the choice number 3 when the party's gold is less than 1000



I was wondering what condition do I make it though. Like, what condition would be the easiest to use so I can disable choice 3 and not mess with party levels, or gold, or items. I just want it to be disabled once it is selected.
if you want it to be selectable only once, then use a switch and check for that switch in the condition - and have it turned on when the choice was selected.
@Rokazulu It would be the same for Raizen's multiple choice script. 


# with a condition
@get_choices = ["one", ["two", "$game_actors[1].level > 4"]]
if you want it to be selectable only once, then use a switch and check for that switch in the condition - and have it turned on when the choice was selected.



I'm not good with scripts, what is the script for switches?



$game_switch nameofswitch = true


something like that?
$game_switches[n]


That's the raw form. What you do with it will vary. So from your statement $game_switches[1] = true         or whatever number the switch is.


You also have self switch. For example - $game_self_switches[[9, 1, 'A']] = true  ( this is [map number, event ID, self switch] )
Alright, I think I'm figuring this out but, when I use the disable_choice(1, "game_switches[125] = true")


it will disable the text right away and not when the choice is selected even though I put the switch on after the choice is selected. If I put it false it will not disable right away, but neither will it disable when I turn the switch off or on.

 


Untitled.jpg
@Rokazulu


That is because the poster above had a typo in his line


The correct condition would be


$game_switches[125] == true


One = is an assignment (that command turned the switch on and is always true


Two == is a comparison, turning the line into the required condition.
@Andar


Thanks, now I will just have one more question to complete this task.


Once all choices are selected (and disabled) I want to move to the next set of choices. Do I have to set like 4 conditional branches to do this or is there a more condensed way?
Depends on what exactly you want to do - I don't even know why you're talking about conditional branches here - or for that matter the loop command in your screenshot is really strange, there should be no need for a loop around a show choice, you can simply require the player to answer the first time it is given.
Depends on what exactly you want to do - I don't even know why you're talking about conditional branches here - or for that matter the loop command in your screenshot is really strange, there should be no need for a loop around a show choice, you can simply require the player to answer the first time it is given.



Well, the loop is so the player can ask the other questions. Then once he has answered like 3 of the 4 questions that are necessary then I want to move it to the other part of the conversation. So I thought I needed conditions for that to happen. Like switch choice1,2,3 = on then it breaks the loop and moves to the next part.

What do you mean by "require the player to answer the first time it is given"?
In the show choices command, you can select what the engine should do on cancel. The default is choice#2, but you also have the options branch and disallow.


On disallow the player cannot cancel the show choice, but has to select an answer.


On Branch it gives you a new branch for what to do on cancel (for example go back to a label)


Using that, especially with labels, is a much better way than using a loop, because a loop can create timing problems or game freezes if something goes wrong.


As for the other part about the conversations - that is on a case by case basis, there are other ways to handle that but it depends alot on the context of the questions.


So no, I can't help you there.
@Andar


Thanks for the help, I can figure it out from here.

Original thread: https://forums.rpgmakerweb.com/threads/disable-a-choice-using-tsukihimes-choice-script.73839/