To implement typewriter sounds in your game, you can subscribe to the Typewriter’s “
OnCharacterVisible” event and play sounds based on it.
The event passes a “char” as a parameter, so you can play different sounds based on different letters as well.
P.S. The event is also triggered with spaces, so be sure to play sounds based on the type of character you prefer.
As an example, you can install the “TypeWriter Sounds” package found inside the “Extra” folder and check its implementation.
Source: main audio source where sounds will be played.
MinSoundDelay: minimum time that has to pass before playing another sound.
Interrupt Previous Sound: If true, the previous audio will be stopped.
Random Sequence: If true, the next audio clip to play will be chosen randomly from the “Sounds” array. If false, sounds will be played subsequently.
Sounds: Typewriter sounds to play.