how to make it so that when the symbol is printed empty, that is, a space, then the sound is not reproduced
Just to close this out since I found a solution when this was asked on the discord:
This is doable by adding a condition to your “typing” sound event. The condition would be a “Compare two numbers” condition that checks the clipped dialogue text’s last character for a space. If no space is found, it plays the sound.
Here it is after I added it in one of the Dialogue examples.
Here’s the example: https://game-previews.gdevelop-app.com/1634912569257-954110/index.html
Here’s the full expression being used to check the last character in the clipped text. This should be project agnostic:
StrFindFrom(DialogueTree::ClippedLineText()," ",StrLength(DialogueTree::ClippedLineText())-1)
StrLength()
A typo in the text, see the picture.
Good call. I’ve fixed it in mine, but this just reiterates that no one should ever copy/manually type an expression, and should instead be using the expression builder.