Event triggers not triggering second dialogue

In my game, the final quest is a "cooking" quest. The player has gathered the necessary materials, which then autoruns an event, prompting the actor to transfer to the kitchen and starts the dialogue for a short choice-making minigame. The player must then choose the right options in the right order to successfully make the cake, or otherwise retry the recipe. Anytime the player chooses the wrong option, they're allowed to either try again, or exit out of the event to search for the cookbook with the recipe inside it.

The recipe book is in the basement, which was searchable before. I believe the answer is simple, but I may have done things strangely, and can't figure out how to get it to work through the method I've gone through.

My problem is this: I can get the correct text to pop up when you interact with the cookbook before the event starts, but after the event is triggered and you choose to look for the cookbook, the event-triggered text does not display. Checking the book before the quest starts will bring up the following text:

Spoiler
1609653401889.png

Then, you go upstairs, finish gathering the ingredients, which then autoruns the beginning of the cooking quest event. When you make a mistake, you're prompted to try again or search for the cookbook. Selecting "search for the recipe book" will close the event, and allows you to search for the book.

Spoiler
1609653761253.png

Heading down to the basement and interacting with the cookbook now loops the default text on page one.

Here's what I've done event-wise, which is probably a backwards way of doing it (I'm still figuring out what buttons do what, bit by bit).

**Please note, due to having the option of wearing cat ears or not, all events will have a conditional branch within which will be the same text, but different face images selected.**

First, the cookbook has three different event spaces. The first and third act as triggers, which may be where the problem lies.

1609654188658.png


1 & 3:
Spoiler
1609654245019.png

1609655334239.png

1609654321083.png

2:
Spoiler
1609655377727.png

1609654480486.png

1609654520105.png

This is the event leading up to these control switch triggers. If you need to see the full event page, let me know; it's lengthy, and I believe the only important part is those self-switches and switches. Event pages 4-5 in the event below are currently irrelevant.

Spoiler
1609654891893.png

1609654946491.png

1609654973323.png

When I attempted to interact with the book itself (without events 1 & 3), it wouldn't allow me.

If you need any other information from me, please let me know! I'll do my best to explain further.

If all goes well, I may have a follow-up question on how to proceed in my event.
Because event 2 is set to "below characters", so the only way to trigger it is while standing on it, which won't work because it's on the counter.
Also, you should move event switches to the bottom of the event page, instead of containing them within the branches, if the only difference is dialogue graphics. It's easier to check for mistakes made, and if fixes are required, you only have to go through them once.
Thank you Milennin! I'll work on moving the event switches soon! That should save me a lot of headaches in the future. 😢

I've gotten rid of the trigger events (1 & 3) and set event 2 to same as characters. However, it still only prompts the default text despite the appropriate control switch conditions being met (the ingredients count is set to 5, and the Cook Book switch is set to ON by the end of EV006 above (page 2).

Default text:
Spoiler
1609811692262.png

Once prompted to find the cookbook:

Spoiler
1609811782868.png

1609811858442.png

Do you know what might be the solution?
Page 2 has no conditions. That means page 1 will never be activated. Swap them around.

The game looks for active pages starting from the highest number to the lowest. As soon as it finds a page where the conditions are all met, or where there are no conditions, it makes that the active page and stops looking.

I'm not sure what the purpose of your conditional branch is there - you do the same thing whether it's true or not.
Thank you, Shaz! Highest number to lowest- meaning starting at page 3? I have them switched now, so if I'm understanding correctly, event page 1 will activate first, then presumably, once the conditions are all met, it should switch to page 2? It still isn't working for me.

Page 1:
Spoiler
1609813987754.png

Page 2:
Spoiler
1609814071650.png

Page 3:
Spoiler
1609814115478.png

I've also tried the reverse, so that page 1 is page 3, page 2 is still 2, and page 3 is page 1. It's still only triggering the original text.

(The conditional branch is there only to change the dialogue image- I will likely move it later, as per Milennin's suggestion!)
The images you have above are correct. Page 1 should have no conditions, page 2 has the switch and variable conditions, and page 3 the self switch conditions.

Which page is active? Which page do you think should be active? What values are in the switches and variables? You can use F9 to see what the switch and variable are set to, and you can change them, just to confirm that the event does work correctly when they have the correct settings.

Where are you changing the switch and variable - can you show that event as well?
Thanks for confirming!

Page 1 should be active BEFORE the event switch, then after starting (and exiting) the cooking quest, page 2 should be active AFTER.

Variables: Before the cooking quest starts, there are five ingredients to collect. Collecting each one adds a permanent +1 to the Ingredients Count variable. If I check the cookbook before all five ingredients are collected, then page 1 should be active.

(Again, ignore the conditional branch!)

One of the five:
Spoiler
1609831479556.png

1609831521816.png

Once all five ingredients are gathered, an event autoruns to start the cooking quest and transfer the player. This autorun event is posted twice; once in both rooms containing the ingredients (the greenhouse and the kitchen). The autorun event includes the cooking quest options itself.

I'll post it below, but due to its size, I've trimmed down to only the important switches. If you want to see the entire event, please let me know!

Autorun Cooking Event (once all ingredients are gathered):

Spoiler
1609831880840.png

1609831911461.png

1609831941458.png


Control Switch: Cook Book = ON
Page 2:
1609832179971.png


Page 3:
1609832214436.png


Pages 4 & 5 are irrelevant to the first three (though again, if you'd like to see them anyway, please let me know!).

AFTER page 3 of EV006, the active page on the cookbook should change to page 2. When you check it again, it should add the recipe to your inventory.

The only problem I can think of is that the Cook Book switch is switched to on in the second page instead of in the first. Would that have any effect on the switch not triggering?

I have also confirmed that the ingredient count is indeed 5 after the cooking quest is triggered.

***EDIT***

Oh, I'm a fool. I checked F9 in-game and realized the cook book switch is, indeed, not on. I'll try adding it to page 1 of the autorun event and see what happens.
FIXED! As soon as I made the cook book switch activate on event page 1 instead of 2, it got it working! Thank you so much for your help, Shaz and Milennin! I didn't know about hitting F9 before, but I know it's going to be a life saver now.😂
I'll just say, your conditional branch is a bit complicated. If you're just using it to change the image that shows in the text box, then just put the Show Text inside the true/false branches. Put everything else after the End.

Code:
If : Party has Cat Ears
  Text : kh_holiday_portrait_layouting_2(3) ...
         Ritsu ...
Else
  Text : kh_holiday_portrait_layouting_2(7) ...
         Ritsu ...
End
Text : None, ...
       OBTAINED ...
Change Items ...
Control Variables ...
Control Self Switch ...

This means if you want to change something, you've only got to do it once (unless it's the text itself), which will be easier and faster.

And if this is one of your actors, I actually wrote an addon plugin for the message window, so you could use Change Actor Images (for example, when the party gets the cat ears), and the Show Text will just use the image assigned to that actor, so you don't have to use a conditional branch at all.


Anyhow, seeing as you've figured it all out and can move on ...

Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/event-triggers-not-triggering-second-dialogue.131760/