RMMV | Help with the event with the multiple choices.

I know I haven't even done much here, but I can already see that something's wrong. So please advise me how I can make it better and clearer, because I have a complete mess.:LZSoops:


In general, I do something like a game mode where you need to get as much information as possible in a limited amount of time, well, it's optional. Given a choice of 5 characters where with each you can have a short dialog (question - answer). after the dialog again rolls back to the choice, but if you choose the same character several times questions and answers will be different each time (4 different dialogs for each). While I was trying to make and figure it out myself I got confused. New questions I decided to change through switches and if\else, but after the first rollback to the beginning of the selection, when I chose the same person I chose before, all dialogs began to play in turn.

I'll attach a screenshot of the event, but I'll tell you right away, it is not finished and I can't change the engine's language from Russian to English, sorry.

(comments are used temporarily for personal comfort and to separate some parts of the event to not get lost. When the work is completed, I remove them)
Spoiler: EVENT
Illustration.png
It's not easy to give advice, as the code isn't in English.

But to me it looks like you didn't use ELSE cases of your Conditonal Branches. If you say, they all play, it's because you set it up like this:

Code:
◆If:Dialogue 1 is ON
  ◆Text:None, None, Window, Bottom
  :    :Dialogue.
  ◆
:End
◆If:Dialogue 2 is ON
  ◆Text:None, None, Window, Bottom
  :    :Dialogue 2.
  ◆
:End
◆If:Dialogue 3 is ON
  ◆Text:None, None, Window, Bottom
  :    :Dialogue 3.
  ◆
:End

What you want to do instead is:

Code:
◆If:Dialogue 3 is ON
  ◆Text:None, None, Window, Bottom
  :    :Dialogue 3.
  ◆
:Else
  ◆If:Dialogue 2 is ON
    ◆Text:None, None, Window, Bottom
    :    :Dialogue 2.
    ◆
  :Else
    ◆If:Dialogue 1 is ON
      ◆Text:None, None, Window, Bottom
      :    :Dialogue.
      ◆
    :End
    ◆
  :End
  ◆
:End
You start with the last dialogue, because the first found condition that returns true will be executed.

It might be better to use a variable instead of switches, so at the end of each dialogue, except the last one, you set it to "Dialogue option +1", and you can set up your conditional branch like this.

This way, there's always only one dialogue active.

Code:
◆If:Dialogue = 1
  ◆Text:None, None, Window, Bottom
  :    :Dialogue 1.
  ◆
:Else
  ◆If:Dialogue = 2
    ◆Text:None, None, Window, Bottom
    :    :Dialogue 2.
    ◆
  :Else
    ◆If:Dialogue = 3
      ◆Text:None, None, Window, Bottom
      :    :Dialogue 3.
      ◆
    :End
    ◆
  :End
  ◆
:End
@Zia_ if switch 1 = ON end should work.
the problem is that if the switch is ON, it also check the value of the switch
below it, which should be separated.

@illuha you want the choices like:
do you think your a good leader?
yes and no, maybe etc,
on yes, activate the switch, on NO, do something else (2nd question).
till a switch is ON.

once ON, you can use a "jump to label" to skip the text that isn't required.
I would make a jump to start to redo the question if they want too.

one a switch is ON, you can do the rest of the question, but the main is,
how many questions do you want to ask?
how many different outcomes?

an "if-else" handler that Zia_ mentions is mostly required as well.

it really depends what the choices exactly does, as you can save those temporarly
inside a variable, so you don't need switches.
Thanks! Variables are really much better.
I followed what you wrote and finally changed the language to English so I think it would be easier.
But I still can't figure out how to make it go back to character selection after each dialogue line.

I'll attach below a screenshot of what I have now, but I didn't add any more selections there if anything. I can attach any info you need if necessary
Spoiler: EVENT
Illustration.png
Great!

You can use "Label" and "Jump to Label".

Code:
◆Label:Start of Dialogue 1
◆If:Dialogue = 1
  ◆Text:None, None, Window, Bottom
  :    :Dialogue 1
  ◆Jump to Label:Start of Dialogue 1
  ◆
:Else
  ◆If:Dialogue = 2
    ◆Text:None, None, Window, Bottom
    :    :Dialogue 2
    ◆Jump to Label:Start of Dialogue 1
    ◆
  :Else
    ◆
  :End
  ◆
:End

Think of it like a bookmark you set in your code and tell the engine to go back there. You can use different names for different labels if necessary.
Great!

You can use "Label" and "Jump to Label".

Code:
◆Label:Start of Dialogue 1
◆If:Dialogue = 1
  ◆Text:None, None, Window, Bottom
  :    :Dialogue 1
  ◆Jump to Label:Start of Dialogue 1
  ◆
:Else
  ◆If:Dialogue = 2
    ◆Text:None, None, Window, Bottom
    :    :Dialogue 2
    ◆Jump to Label:Start of Dialogue 1
    ◆
  :Else
    ◆
  :End
  ◆
:End

Think of it like a bookmark you set in your code and tell the engine to go back there. You can use different names for different labels if necessary.
Everything works fine now after every line the player goes back to selection but for some reason I can't unlock new dialogs anymore. I didn't change anything in the events, just added the same one for a different character
video of what it looks like
Make sure the "Jump to Label" is at the end of the whole entry of the current selected dialogue. That includes the variable+1.
And - did you make sure you have a different variable for each character?
Make sure the "Jump to Label" is at the end of the whole entry of the current selected dialogue. That includes the variable+1.
And - did you make sure you have a different variable for each character?
Varables were all different. Now everything working perfectly, thank you very much!👋
if else with +1, while you only get +1, the other never runs.
I think you messed it probably more.

you check if the variable =1 , than it never runs, probably none of the choices.
complex nesting also require -1 variable if you go back once or cancel out.

not doing this can mess it more and more, depending how you ask the questions 😉

so make sure you do this correctly and test it a few more times so it runs
100% correct, or it could break later.

another thing is to "cap" the variable to not go over it, and if it's temporarily you
set it to 0.

good luck with your project 🙂
if else with +1, while you only get +1, the other never runs.
I think you messed it probably more.

you check if the variable =1 , than it never runs, probably none of the choices.
complex nesting also require -1 variable if you go back once or cancel out.

not doing this can mess it more and more, depending how you ask the questions 😉

so make sure you do this correctly and test it a few more times so it runs
100% correct, or it could break later.

another thing is to "cap" the variable to not go over it, and if it's temporarily you
set it to 0.

good luck with your project 🙂
I'm sorry, I barely understand what you are saying. But I think you got their request wrong.
It's correct how they did it.
I'm sorry, I barely understand what you are saying. But I think you got their request wrong.
It's correct how they did it.
question
text with variable + 1
if variable = 1
text
else
if variable = 2 < this wont run!
end
end

so the event looks weird as none behind 1 can be run correctly to my view.
but I would event this differently so each condition can be run once the value is correct.
and other could be skipped if the value is not equal to.

but if it works, it works, but still, it should be tested thoroughly to make sure it
works as it should and can use other dialogues correctly, based on the value.

besides, +1 on the if else is also useless as it can just continue the list 🙂
@illuha
After reviewing the event once more, I see one issue. Maybe you fixed it already, as this isn't the latest version of your event. If not, you might want to look into it:

Remove the first var+1, and use "0", "1", "2", "3" in the conditional branches.
Otherwise you will add +1 before and after talking to the people, so it would basically add +2 per dialogue.

1737121185144.png



@ShadowDragon Is it that what you're referring to?
@ShadowDragon Is it that what you're referring to?
no, you can remove all +1 variables and combine them as 1 as it just jump to 1 question
to another without choices 😉
The Multiple choice is to select the person you talk to.

Each person has 4 dialogues, and every time you select them, they shall say the next dialogue until they reached their 4th dialogue.

The +1 will push you one entry further, everytime you talk to them.
oh, now that you mentioned that, yea, it can work, but it should be reset somehow 🙂

a better approach personally instead of +1 would be random 0-3 instead 🙂
so you don't have to reset it.
They don't want it to be random and they don't want it to reset. It's an ongoing dialogue.
They don't want it to be random and they don't want it to reset. It's an ongoing dialogue.
I just got a new problem. It's impossible to get out of this event now. What do I do?


When the time runs out, in a parallel event originally for the testing I had the exit to the main menu and it worked. But now when I want to progress the story I just stuck on the moment with the selection, but without a timer, but had to move to another map just through that parallel event
Don't you have a "Cancel" option in your Multiple Choice to get out?

And has it to be a Parallel Process? A dialogue like this should be called or an Autostart I guess.
Don't you have a "Cancel" option in your Multiple Choice to get out?

And has it to be a Parallel Process? A dialogue like this should be called or an Autostart I guess.
I hurried when I was writing, sorry. I'll explain it better. there are three main events that are related to the timer. event with debates - autorun. Event when the time goes out - parallel. Event with stopping the timer that is not used - action button. Since I have a plugin from SRD to upgrade the timer, I use settings that will automatically delete the timer if time runs out or the player leaves the map so the last event is purely for the timer to work properly. I wanted the player to move to another map where I could develop the story further. But now even when the time is up and the flash animation and SE from the parallel event is played, I am not transferred to another map. I just stay where I was, but without time limits.

Spoiler: EVENTS
Illustration.png
A detail first: You selected "Choice #5" for cancel in your multiple choice. Maybe you want to set that to "disallow", as you don't want to select a choice when pressing ESC.

Did I understand correctly, that you don't want the player to get out of the leadership dialogue until the timer is 0?

If yes, you can put the check for Timer =< 0 into your Debate event and don't need the Parallel process.

Below your Label you jump to, you put the "If Timer =< 0" conditional branch, so it will be checked every time you get back up there.
The whole actual dialogue that would follow can be put into the ELSE case of your "If Timer =< 0" conditional branch.

So, you jump to the Label. The timer will be checked. If the timer is 0, you will be teleported. If the timer is not 0, the dialogue options will repeat. You probably won't be teleported right away, but after finishing the current dialogue, but that might be good to not break things.

Original thread: https://forums.rpgmakerweb.com/threads/rmmv-help-with-the-event-with-the-multiple-choices.174775/