Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't DismissLine when options are presented #266

Open
jakezatecky opened this issue Feb 10, 2024 · 0 comments
Open

Don't DismissLine when options are presented #266

jakezatecky opened this issue Feb 10, 2024 · 0 comments

Comments

@jakezatecky
Copy link

jakezatecky commented Feb 10, 2024

Is your feature request related to a problem? Please describe.
Instead of persisting the last line of dialogue alongside the dialogue options, Yarn Spinner will invoke DismissLine. It has the concept of LastLine for the OptionsListView, but that does not persist the same formatting of the previous dialogue line.

For context, I have a dialogue system that presents dialogue options to the right of the current dialogue line. I do this to show the full context for the options the player has. I do not use LastLine, because it collapses relevant information into a singular text element.

Therefore, I use a modified LineView that does not dismiss itself when DialogueRunner calls DismissLine. I manage the transition to new lines with the RunLine method, instead. I attach an onDialogueComplete event to remove the last line when the dialogue concludes.

While this works, it is an unpleasant workaround to the fact that Yarn Spinner dismisses lines before options appear.

Describe the solution you'd like
Rather than invoking DismissLine when Yarn encounters a set of options, I would like to have an option to force it to wait until it is ready to read a new line. This way, instead of using the awkward LastLine component, we can persist the previous piece of dialogue, with the full context for the player.

Describe alternatives you've considered
As noted above, I use a modified variant of LineView and rely on onDialogueComplete to clean up the last line when the dialogue concludes.

Additional context
The way I manage dialogue is more commonplace in video games than the model Yarn Runner uses. Most games persist whatever piece of dialogue triggered a set of options instead of dismissing it and rendering a condensed variant.

@jakezatecky jakezatecky changed the title Don't DismissLine when options are presented Don't DismissLine when options are presented Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant