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

Spamming input action can skip [ns] effects, even at the start #2220

Open
a-soulspark opened this issue May 7, 2024 · 2 comments
Open

Spamming input action can skip [ns] effects, even at the start #2220

a-soulspark opened this issue May 7, 2024 · 2 comments
Labels
Bug 🐞 Something isn't working

Comments

@a-soulspark
Copy link

The problem

It's possible to spam the dialogic input action (e.g. spam space) to skip [ns] (no-skip) effects, even if they're the very first character in a text event. I believe this makes it impossible to have a truly unskippable text message, and it can also happen by accident if the player accidentally presses the space bar twice.

To Reproduce
Steps to reproduce the behavior:

  1. Create a timeline with a single text event, like
[ns]You shall not skip!!

... or shall you?
  1. Playtest the timeline, spamming the skip input action (default space bar/mouse click) before the text box even shows up
  2. Notice how the message was skipped. If you don't spam quite as fast, it wouldn't have been skipped.

Expected behavior
The message would not be skipped, and you'd have to let it play out till the end.
Quite useful for cutscenes, and important messages that shouldn't be skipped!

System (please complete the following information):

  • OS: Windows
  • Godot Version: 4.2.2
  • Dialogic Version: 2.0 alpha-13 (also tested on main branch)

Solutions

Workaround

Unknown.

Possible fixes

Making it so that the effect is processed before you have the chance to skip it, or
Adding a separate option/event to make the whole message unskippable, so it can be executed before the Text event starts?

@a-soulspark
Copy link
Author

Another solution (which is what I'd do as a workaround, but I'm unaware how to do this), would be to add an variation of [ns] which would also halt skipping: any skipping attempt would only go up to that effect.

Example:
If you tried skipping a message such as

Skip me... [modified_ns]If you can!

it would skip to immediately before the word "If" which follows the text effect, disable skipping afterwards, and then continue the message reveal.

The nice bonus is, if you used that at the start of the message, it would effectively prevent you from skipping.
(the ability to stop skips at a certain point is in general quite useful, so it could be made into a separate effect without the [ns] behavior as well. Also, [n] and [n+] do not work for this exact purpose.)

@a-soulspark
Copy link
Author

Update: I've pieced together how the skipping works, and managed to make a (seemingly) working implementation of the "halt" effect that interrupts skipping, as mentioned above. It's not great though, I ended up bending the abstraction for effects a bit to achieve it as effects aren't designed for this. LMK if it's worth sharing nonetheless!

As useful as that effect is, it unfortunately didn't fix the original issue of spamming to skip [ns] at the start.
However, I found that simply moving States.REVEALING to after the await where textbox is updated is enough. It seems like a harmless change (this state is only used twice in the code, both for skipping, which is what should be changed)

@Jowan-Spooner Jowan-Spooner added the Bug 🐞 Something isn't working label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants