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

Auto skip #1046

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

addie-lombardo
Copy link

Description

A common quality of life feature in visual novels is the ability to have the dialog continue after a period of time. I've implemented this feature into Fungus.

What is the current behavior?

Currently you are required to click/press a button each time you want to advance the text.

What is the new behavior?

Pressing the Tab key now toggles auto skip on and off. If enabled when a dialog entry ends it will wait the amount of time specified by Writer.AutoSkipWaitLength before continuing to the next command. If auto skip gets enabled after dialog has already finished printing it counts it as an input and continues to the next command. Additionally I've added a new serialized variable in SayDialog named autoSkipGO which takes a GameObject which will be toggle on and off to indicate to the player that auto skip is on (see GIF).

Other information

CleanShot 2022-01-03 at 09 36 25

@breadnone
Copy link
Contributor

breadnone commented Feb 2, 2022

Wouldn't it better if it's just a coroutine right after the typing is done? similar to Wait For Click, this way we don't need to check every frame on Update and definitely much more cleaner.

Edit: You don't event need a coroutine for this to work, a regular method would work wonders too, unless you want to put some sort of delays at the end before skipping, then yeah, coroutine is the way to go.

@addie-lombardo
Copy link
Author

Wouldn't it better if it's just a coroutine right after the typing is done? similar to Wait For Click, this way we don't need to check every frame on Update and definitely much more cleaner.

Edit: You don't event need a coroutine for this to work, a regular method would work wonders too, unless you want to put some sort of delays at the end before skipping, then yeah, coroutine is the way to go.

Fair enough! The code is actually from my game where we do have some delays/coroutines to yield to at the end hence the coroutine but I can definitely change it.

@breadnone
Copy link
Contributor

breadnone commented Feb 3, 2022

oh I see now, the Update just for checking button presses.

Also, don't hardcode the button let users choose it instead?

@Arylos07
Copy link
Contributor

Arylos07 commented Feb 8, 2022

I was working on a similar feature that worked in a similar way, but allowed voice over correction and click-through. However, life got in the way before I could finish it. When my schedule improves, I'll look into opening a PR and adding it; it was nearly done but needed some thorough testing.

@breadnone
Copy link
Contributor

@Arylos07 Wait until this pr gets merged than work based on the new develop branch, or else.. well... conflicts XD

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

Successfully merging this pull request may close these issues.

3 participants