Hi Tony,
I'm still really enjoying your Dialogue System and it opened so many doors for me as a "Non-Programmer".
I've implemented animated characters that get triggered by Dialogue Entries. Now I want to be able to stop the talking animation when the Typewriter is done writing. Is it possible to trigger Bolt Custom Events in the Typewriter script? Could you push me into the right direction?
I want the Typewriter Script to send a custom event to my Dialogue Animation Control Script once the writing is done.
Thank you for your help!
Get Typwriter Updates into Bolt
Re: Get Typwriter Updates into Bolt
Hi,
The typewriter sends a sequencer message "Typed" when it's done. It's commonly used like this:
The first line tells the speaker's Animator to play the "Talk" state. The second line waits until the typewriter sends the sequencer message "Typed"; then it tells the Animator to play the "Idle" state.
Side note: An improved version of that sequence is:
The 'required' keyword guarantees that AnimatorPlay(Idle) plays even if the player skips ahead before the typewriter is finished.
The Dialogue System Extras page has an updated Bolt Support package with a new BoltEvent() sequencer command that you can use to accomplish something similar. (Future readers: If you're using DS 2.2.21 or higher, the sequencer command is already in the regular Bolt Support package.)
The syntax is:
BoltEvent(event, [subject])
The subject is optional. If omitted, it sends the event to the Bolt machine on the speaker. Example sequence:
If your Bolt machine handles a custom event named "DoneTyping", it will get this event when the typewriter is done.
The typewriter sends a sequencer message "Typed" when it's done. It's commonly used like this:
Code: Select all
AnimatorPlay(Talk);
AnimatorPlay(Idle)@Message(Typed)
Side note: An improved version of that sequence is:
Code: Select all
AnimatorPlay(Talk);
required AnimatorPlay(Idle)@Message(Typed)
The Dialogue System Extras page has an updated Bolt Support package with a new BoltEvent() sequencer command that you can use to accomplish something similar. (Future readers: If you're using DS 2.2.21 or higher, the sequencer command is already in the regular Bolt Support package.)
The syntax is:
BoltEvent(event, [subject])
The subject is optional. If omitted, it sends the event to the Bolt machine on the speaker. Example sequence:
Code: Select all
BoltEvent(DoneTyping)@Message(Typed)
Re: Get Typwriter Updates into Bolt
Great thx Tony.
One more question. Where do I add this command? Can I add it to the typwriter script so it gets automatically sent after every line written, or do I have to add it to every dialogue entry manually?
One more question. Where do I add this command? Can I add it to the typwriter script so it gets automatically sent after every line written, or do I have to add it to every dialogue entry manually?
Re: Get Typwriter Updates into Bolt
You can add it to the Dialogue Manager GameObject's Display Settings > Camera & Cutscene Settings > Default Sequence, like this:
Code: Select all
Delay({{end}});
BoltEvent(DoneTyping)@Message(Typed)