Looking to add SFX to dialogue typewriter effect

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
brownseanh
Posts: 4
Joined: Tue Apr 09, 2024 10:41 am

Looking to add SFX to dialogue typewriter effect

Post by brownseanh »

Hi, I am a sound designer on a project that uses the Pixel Crushers Dialogue System. Our game makes use of the typewriter text scrolling effect when displaying NPC dialogue, and I was hoping to add some short sounds that can play with each letter or "click of the typewriter", if that makes sense. Ideally I would be able to set it up so that the system chooses from a bank/array of short little bloops and randomly selects one each time. I am not super familiar with this dialogue system, so any info and help would be greatly appreciated. Thanks!
User avatar
Tony Li
Posts: 20775
Joined: Thu Jul 18, 2013 1:27 pm

Re: Looking to add SFX to dialogue typewriter effect

Post by Tony Li »

Hi,

You can set audio clips here:

typewriterAudioClips.png
typewriterAudioClips.png (68.15 KiB) Viewed 86 times

If you're using TextMesh Pro (see TextMesh Pro Support), the component will be TextMesh Pro Typewriter Effect.

Related: How To: Vary Character Mumble Speak With Typewriter Effect
brownseanh
Posts: 4
Joined: Tue Apr 09, 2024 10:41 am

Re: Looking to add SFX to dialogue typewriter effect

Post by brownseanh »

Hi, thank you for your quick response. I have attached some images to help illustrate what I see on my end.

I tried looking for that game object and component and couldn't find something that exactly matches. It looks like we have customized the system a bit, so the closest object I was able to find was "NPC Subtitle Line" (shown in Figure 1). It has the "Typewriter Effect" script component attached, but instead of an array of sounds it only has place for one (shown in Figure 2). I changed it to an array and loaded in my desired SFX files, but they did not play upon loading the scene. Instead, our default typewriter SFX played instead. This is normally fine, but I am trying to add unique typewriter dialogue SFX for certain NPCs.

I searched for where the default typewriter SFX were being referenced in the scene, which showed me Figure 3. However, upon inspecting each of those game objects I could not find the references in question. The same is true for both the "Unity UI Typewriter Text" and "TextMesh Pro Typewriter Effect" scripts. Upon searching for references in the scene, both queries displayed the same results as when I searched for the default typewriter SFX, and as with those, I could not find the script being used on the game objects that appeared as search results. Any ideas on where to go from here? I am admittedly not very scripting savvy, so I apologize if this is an easy solution that I am just missing. I appreciate your help!
Attachments
Figure 3.png
Figure 3.png (699.61 KiB) Viewed 83 times
Figure 2.png
Figure 2.png (39.17 KiB) Viewed 83 times
Figure 1.png
Figure 1.png (97.92 KiB) Viewed 83 times
User avatar
Tony Li
Posts: 20775
Joined: Thu Jul 18, 2013 1:27 pm

Re: Looking to add SFX to dialogue typewriter effect

Post by Tony Li »

That "TypewriterEffect" script is not part of the Dialogue System. I suggest checking with your programmer and, if they say it's okay, remove that script and add a UnityUITypewriterEffect or TextMeshProTypewriterEffect depending on whether your Subtitle Text GameObject is using a UI Text or a TextMeshProUGUI component.
brownseanh
Posts: 4
Joined: Tue Apr 09, 2024 10:41 am

Re: Looking to add SFX to dialogue typewriter effect

Post by brownseanh »

Gotcha. Thanks, I'll do that!
User avatar
Tony Li
Posts: 20775
Joined: Thu Jul 18, 2013 1:27 pm

Re: Looking to add SFX to dialogue typewriter effect

Post by Tony Li »

Glad to help!
Post Reply