Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

yhiroki

1
Posts
1
Topics
A member registered Jun 13, 2020

Recent community posts

I would like to create an effect where the interval between displaying characters slows down as more characters are displayed. (For example, like a person leaving their last words on their deathbed!)

I have tried the following code, but there is no change in the character display interval and it is not working as expected.

// Calculate to increase up to five times the normal interval when the maximum number of characters is reached
float maxDelay = _textDispInterval * 5;
float currentDelay = _textDispInterval + (_currentShowCharacterCount / (float)stm.Text.Length) * (maxDelay - _textDispInterval);
stm.readDelay = currentDelay

Is there a way to achieve such an effect?