At What Point Does The "Was Shown" Flag For A Dialogue Item Get Switched To True?

General discussion of the House Party CSC, or get help making your own story.
Forum rules
Please follow all Eek! Forum rules.
Post Reply
MajorDong
Posts: 46
Joined: Mon Jan 24, 2022 10:41 am

At What Point Does The "Was Shown" Flag For A Dialogue Item Get Switched To True?

I'm having trouble trying to create a dialogue sequence and the system seems to be defying the documentation for the CSC (as posted here: https://forum.eekllc.com/viewtopic.php?f=9&t=1976).

My understanding is that if a different dialogue item is triggered within a particular dialogue's "Start Events", then that automatically discontinues the initial dialogue and instead triggers the secondary dialogue. What's actually happening for me is that the first dialogue appears, and then when it finishes, the secondary dialogue triggers, as if it was called as a "Close Event", instead of a start event. (And yes, I have checked to insure that I didn't put the dialogue call into the close events by mistake.)

So here's what I'm trying to do:

I want Derek to have a repeatedly-used dialogue (number 59) that:
1. On first call displays itself.
2. On second call displays a different dialogue item (number 60).
3. On all subsequent calls randomly displays either itself or dialogue number 60, based on a Coin Flip.

Here's how I do it:

Code: Select all

Dialogue 59
Start Events:
	Dialogue - Derek - Trigger - Number 60
	Criteria:
		Dialogue - Derek - Number 59 - Was Shown
		Dialogue - Derek - Number 60 - Was Not Shown

	Dialogue - Derek - Trigger - Number 60
	Criteria:
		Dialogue - Derek - Number 59 - Was Shown
		Dialogue - Derek - Number 60 - Was Shown
		Coin Flip
Additionally, I want Dialogue 59 to present one of two possible responses. I want the first response to display only ever on the first call of Dialogue 59, and the second response to always display on every subsequent call, but not on the first. Here's what I did:

Code: Select all

Response 1
Criteria:
	Dialogue - Derek - Number 59 - Was Not Shown
	
Response 2
Criteria:
	Dialogue - Derek - Number 59 - Was Shown
However, on first call, the dialogue presents only Response 2. This leads me to believe that the "Was Shown" flag for the dialogue gets set to "True" before the code that decides which responses to display executes. However, the fact that the initial dialogue call displays Dialogue 59, and then Dialogue 60 has me completely confused. It seems like the "Was Shown" flag doesn't switch until after the Start Events fire, or else otherwise Dialogue 59 wouldn't display at all on that first call and I'd immediately be diverted over to Dialogue 60. But instead, the game seems to be confused and fires them both in sequence.

I'm confused, too. :(
chimneyfish
Posts: 498
Joined: Tue Nov 27, 2018 8:57 pm

Re: At What Point Does The "Was Shown" Flag For A Dialogue Item Get Switched To True?

I tested this independently and you're right. I got the same results.

I think the solution is to set variables on the dialogue close events and use those instead of "Was Shown"
peter980
Posts: 1604
Joined: Thu Feb 15, 2018 1:50 am

Re: At What Point Does The "Was Shown" Flag For A Dialogue Item Get Switched To True?

MajorDong wrote: Thu Aug 24, 2023 3:06 amMy understanding is that if a different dialogue item is triggered within a particular dialogue's "Start Events", then that automatically discontinues the initial dialogue and instead triggers the secondary dialogue. What's actually happening for me is that the first dialogue appears, and then when it finishes, the secondary dialogue triggers, as if it was called as a "Close Event", instead of a start event. (And yes, I have checked to insure that I didn't put the dialogue call into the close events by mistake.)
This is weird, since if you check DLG 0 of the Original Story for each character, all of them have a lot of dialog triggers in the start event. And only the first one that has true criteria gets executed and replaces the original dialog, with everything after the first match from the original DLG 0 getting skipped.

Can you actually show what is shown in the game debug log, when you try your tests? It will be helpful.
Post Reply