Add Signal text_started that aligns with the text appearing #2523
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
await
on line 124 can take some time depending on if the textbox fades in or has an animation when opening, and because of that theabout_to_show_text
signal has a delay before the text begins to render.Delay from before the await to after the await measured by
Time.get_ticks_msec()
If you use
about_to_show_text
to enable an animation, as an example for lip flaps, the delay makes it look awkward because mouth begins moving before the text begins rendering. This PR adds a signal after the await so that it's closer to when the text starts rendering.Here's an example where I swap between a normal mouth to an
AnimatedSprite2D
for the character to talk:I saw while I was researching there was similar methods to this that may have been in previous versions like
started_revealing_text
but those seem to have been removed or something.