Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Alright, working on the first bug.  I was able to recreate it by having a very long string, then a delay, and more text after.

STM is supposed to only be able to play a sound in the reading out loop if the latest letter being read is a different one than the last frame, so... ok got it.

The issue is that every frame the mesh is updated, it'll say "the last letter that was read was X", so it'll only play the sound of the latest letter that was read. So the issue is caused by the mesh moving so fast, the last letter that was read could be... 40, and the delay is at 80 and lasts 1 second, so the mesh will try to play the sound for everything between 40 and 80 as it catches up.

On line 1127, replace the if statement with this one:


if(myAnimPos > 0f && !undrawingMesh && i > latestNumber){
    DoEvent(i); //do every event up to this integer
    if(!playedSoundThisFrame){
        PlaySound(i); //only play one sound this frame, from the first letter drawn this frame
    }
    latestNumber = Mathf.Max(latestNumber, i); //find latest number to start from next frame
}


The variable "playedSoundThisFrame" replaces "foundLatestNumber", so change the name of the boolean on line 1111, too.