Skip to content

Default Typewriter behaviour is counter-intuitive when it comes to changing speed at runtime. #140

Description

@TheMartianLife

This is half a feature request and half a bug report for unexpected behaviour, in that the current behaviour is by design but confuses everyone enough that they think it's broken.

The issue

The way you set typewriter speed is with a setting on the presenter. A presenter will then create a default typewriter with the requested speed, but if you now change the speed the way you set it initially (via the presenter) then the typewriter has no way of knowing and will remain unchanged.

You can change the speed of a typewriter at runtime, but it requires getting hold of the created typewriter object and changing its LettersPerSecond/WordsPerSecond directly.

The proposal

The default typewriters be set to listen for changes to the speed property on their parent presenter, and update their LettersPerSecond/WordsPerSecond accordingly.

A secondary proposal

The previous proposal allows applying a change to typewriter speed at runtime, but will only apply from the following line onwards.

Though it's more work, if the logic of the default typewriters were updated to use counting offsets instead of time offsets, changing speed in the middle of a line would be possible too. This would bring base Yarn Spinner in line with the TextAnimator integration that Yarn Spinner+ has, which allows changing typewriter speed mid-line with the use of [speed=n].

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething not working as intendedProposalAn idea for a new feature or changed behaviour you wantUnityIssues concerning the Unity engine-specific code in the YarnSpinner-Unity repo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions