2.0 Add Character Animation support #998
Merged
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.
Animations for portraits
Animations are a script file that extends the new DialogicAnimation class.
There are currently X animations:
These scripts have to have an
animate()
function. The class has a couple of variables that you can use, most importantly the.node
which is a reference to the node that should be animated.The animations should emit
finished_once
once finished. The animations above use the SceneTreeTweener for animating (except for the instant animation).Animations on character event
The
Character event
has a couple of more settings, that show under different circumstances:In the text version they are stored as an additional shortcode.
E.g.:
Join Emilio (sad) 3 [animation="Bounce In" length="2.0" wait="True"]
Animation settings
There is a settings page for animations where you can specify a custom animations folder as well as default settings for join and leave mode.
They default to:
Additional changes
Resource picker
I've decided to make the resource picker more adaptable (to use it for the animations).
You can now specify a method for listing suggestions. If you give a file_extension it will default to listing all of those files.