Typewriter effect and Sound effect
Typewriter effect and Sound effect
Hello, i want to add typewriter effect to dialogues and typewriter sound effect for each letter typed.
I would be sincerely glad if anyone can guide me step by step, like telling a complete noob.
Thank you very much:)
I would be sincerely glad if anyone can guide me step by step, like telling a complete noob.
Thank you very much:)
Re: Typewriter effect and Sound effect
Hello,
The prefabs that are included with the Dialogue System already have the typewriter effect. Here is the easiest way to get started:
The prefabs that are included with the Dialogue System already have the typewriter effect. Here is the easiest way to get started:
- Complete the Quick Start tutorial.
- Add the Dialogue Manager prefab to your scene.
- Assign your dialogue database to the Initial Database field, or click Create to create a new one.
- Clear the Dialogue UI field. (Set it to None.)
- Assign the prefab "Basic Standard Dialogue UI" to the Dialogue UI field. You can find it in Plugins / Pixel Crushers / Dialogue System / Prefabs / Standard UI Prefabs / Templates / Basic. It will ask if you want to assign the prefab or add an instance to the Dialogue Manager's Canvas. Select Add Instance. This will add an instance to the Dialogue Manager's Canvas child GameObject.
- Expand Dialogue Manager > Canvas > Basic Standard Dialogue UI > NPC Subtitle Panel and inspect Subtitle Text.
- Subtitle Text has a Unity UI Typewriter Effect component. Assign a sound effect to the Audio Clip field. You can assign additional sounds to the Alternate Audio Clips field. The typewriter effect will randomly choose a sound for each character.
Re: Typewriter effect and Sound effect
Thank you very much for your detailed reply:) I did it but there are some problems:
1) if i click on conversation before it is fully typed, it gets kinda bugged. It skips next dialogue and comes back to continue typing.
so is there a way to prevent clicking dialogue while it is still being typed?
2) in another long dialogue it just skips typing and all text appears suddenly
3) when there are 2 or more dialogues to choose' only the latest one is typed but the previous dialogues appear immediately.
4) audio clip starts before typing and end before typing ends. how can i sync them?
thank you very very very very much:)
1) if i click on conversation before it is fully typed, it gets kinda bugged. It skips next dialogue and comes back to continue typing.
so is there a way to prevent clicking dialogue while it is still being typed?
2) in another long dialogue it just skips typing and all text appears suddenly
3) when there are 2 or more dialogues to choose' only the latest one is typed but the previous dialogues appear immediately.
4) audio clip starts before typing and end before typing ends. how can i sync them?
thank you very very very very much:)
Re: Typewriter effect and Sound effect
What do you mean by "click on conversation"?
I'm not sure what you mean, but you may be able to use a Dialogue System Events component as described in the second half of the Interaction Tutorial. The Dialogue System Events component has events like On Conversation Start () that you can use to turn things off during conversations.
I'll need more information about how you're starting the dialogue and when this issue happens.
Have you turned on a continue button mode? If so, are you clicking the continue button? In the Basic Standard Dialogue UI, the continue button is configured to fast forward to the end of the text if it's still typing. If it's done typing, it will proceed to the next dialogue entry node.
If they are shown in the response menu panel, none of them should be typed. When the player chooses from the response menu panel, if you want the choice to appear and be typed, inspect the Dialogue Manager. Tick Subtitle Settings > Show PC Subtitles During Line and untick Skip PC Subtitle After Response Menu.
That shouldn't happen. It sounds like maybe more than one typewriter effect is running. Under what conditions does this happen?
I'm finishing work for the night, but I'll check back in the morning.
Re: Typewriter effect and Sound effect
Dear Tony for the best communication i recorded screen videos for my problems.
Here is the link for google drive: https://drive.google.com/drive/folders/ ... sp=sharing
I explained problems in dialogues in game scenes.
I can't thank you enough!
Regards,
Here is the link for google drive: https://drive.google.com/drive/folders/ ... sp=sharing
I explained problems in dialogues in game scenes.
I can't thank you enough!
Regards,
Re: Typewriter effect and Sound effect
Thanks for preparing the videos. I'll take a look at them this afternoon and try to reply with an answer.
Re: Typewriter effect and Sound effect
Hi,
You should not have a typewriter effect on your response button texts. You should only have typewriter effects on your NPC Subtitle Panel's Subtitle Text and your PC Subtitle Panel's Subtitle Text.
Also, try this: Inspect the Dialogue Manager. Tick Subtitle Settings > Show PC Subtitles During Line. You may also want to untick Skip PC Subtitles After Response Menu.
To customize the appearance of the quest boxes in the upper right of your screen, add an instance of Basic Standard Quest Tracker HUD to the Dialogue Manager's Canvas. Then inspect the Dialogue Manager's Instantiate Prefabs component and remove Basic Standard Quest Tracker HUD from its Prefabs list.
Now that Basic Standard Quest Tracker HUD is in your scene, you can customize its appearance.
You should not have a typewriter effect on your response button texts. You should only have typewriter effects on your NPC Subtitle Panel's Subtitle Text and your PC Subtitle Panel's Subtitle Text.
Also, try this: Inspect the Dialogue Manager. Tick Subtitle Settings > Show PC Subtitles During Line. You may also want to untick Skip PC Subtitles After Response Menu.
To customize the appearance of the quest boxes in the upper right of your screen, add an instance of Basic Standard Quest Tracker HUD to the Dialogue Manager's Canvas. Then inspect the Dialogue Manager's Instantiate Prefabs component and remove Basic Standard Quest Tracker HUD from its Prefabs list.
Now that Basic Standard Quest Tracker HUD is in your scene, you can customize its appearance.
Re: Typewriter effect and Sound effect
Thank you very much!
I did add an instance of Basic Standard Quest Tracker HUD to the Dialogue Manager's Canvas. Then inspect the Dialogue Manager's Instantiate Prefabs component and remove Basic Standard Quest Tracker HUD from its Prefabs list as you said:
But now it is not updating tracker or not showing values of variables as they are updated from conversation, it only writes Quest name or showing Quest Description. I added UpdateTracker() sequence to the dialogues, It was woriking fine with standard prefab version.
2) I really feel sorry for asking so many question but i am writer learning coding and unity from youtube so thank you very much for your kind understanding:)
I added saivng system and auto save scripts to dialogue maanger. Also found and added your RememberCurrentDialogEntry script to dialogue manager.
Now it saves the game and last conversation without problem. Than i added a reset button on canvas with functions of:
DialogueManager.ResetDatabase(DatabaseResetOptions.RevertToDefault);
Scene scene = SceneManager.GetActiveScene(); SceneManager.LoadScene(scene.name);
My problem is: It resets the scene and reloads the main scene (not DontDestroyOnLoad scene), and quest entries are reset.
However: dialogues remains the same, not going back to the first dialogue and restarting conversation unless i exit from runtime and rerun the game.
Is there a way to restart the dialogues with reset button form the begining without exiting the game or runtime?
Millions of thanks:)
I can make videos if neccessary:))
I did add an instance of Basic Standard Quest Tracker HUD to the Dialogue Manager's Canvas. Then inspect the Dialogue Manager's Instantiate Prefabs component and remove Basic Standard Quest Tracker HUD from its Prefabs list as you said:
But now it is not updating tracker or not showing values of variables as they are updated from conversation, it only writes Quest name or showing Quest Description. I added UpdateTracker() sequence to the dialogues, It was woriking fine with standard prefab version.
2) I really feel sorry for asking so many question but i am writer learning coding and unity from youtube so thank you very much for your kind understanding:)
I added saivng system and auto save scripts to dialogue maanger. Also found and added your RememberCurrentDialogEntry script to dialogue manager.
Now it saves the game and last conversation without problem. Than i added a reset button on canvas with functions of:
DialogueManager.ResetDatabase(DatabaseResetOptions.RevertToDefault);
Scene scene = SceneManager.GetActiveScene(); SceneManager.LoadScene(scene.name);
My problem is: It resets the scene and reloads the main scene (not DontDestroyOnLoad scene), and quest entries are reset.
However: dialogues remains the same, not going back to the first dialogue and restarting conversation unless i exit from runtime and rerun the game.
Is there a way to restart the dialogues with reset button form the begining without exiting the game or runtime?
Millions of thanks:)
I can make videos if neccessary:))
-
- Posts: 60
- Joined: Thu Mar 24, 2022 12:07 am
Re: Typewriter effect and Sound effect
Is there a way to add this typewriter effect to the other templates, like Runic, for example?Tony Li wrote: ↑Mon May 27, 2019 9:12 pm Hello,
The prefabs that are included with the Dialogue System already have the typewriter effect. Here is the easiest way to get started:
Add a Dialogue System Trigger, like in the Quick Start. Make sure that your typewriter effect works the way you want. Then customize the appearance of the dialogue UI to your liking.
- Complete the Quick Start tutorial.
- Add the Dialogue Manager prefab to your scene.
- Assign your dialogue database to the Initial Database field, or click Create to create a new one.
- Clear the Dialogue UI field. (Set it to None.)
- Assign the prefab "Basic Standard Dialogue UI" to the Dialogue UI field. You can find it in Plugins / Pixel Crushers / Dialogue System / Prefabs / Standard UI Prefabs / Templates / Basic. It will ask if you want to assign the prefab or add an instance to the Dialogue Manager's Canvas. Select Add Instance. This will add an instance to the Dialogue Manager's Canvas child GameObject.
- Expand Dialogue Manager > Canvas > Basic Standard Dialogue UI > NPC Subtitle Panel and inspect Subtitle Text.
- Subtitle Text has a Unity UI Typewriter Effect component. Assign a sound effect to the Audio Clip field. You can assign additional sounds to the Alternate Audio Clips field. The typewriter effect will randomly choose a sound for each character.
Re: Typewriter effect and Sound effect
Hi,
The Runic Standard Dialogue UI prefab is already configured with a Unity UI Typewriter Effect component. If you've switched it to use TextMesh Pro, you'll need to remove this component and add a TextMesh Pro Typewriter Effect component instead. If you're using continue buttons that have Standard UI Continue Button Fast Forward components, assign the new typewriter effect(s) to them.
The Runic Standard Dialogue UI prefab is already configured with a Unity UI Typewriter Effect component. If you've switched it to use TextMesh Pro, you'll need to remove this component and add a TextMesh Pro Typewriter Effect component instead. If you're using continue buttons that have Standard UI Continue Button Fast Forward components, assign the new typewriter effect(s) to them.