[SOLVED] character.say - How is the time delay calculated?

Started by WHAM, Fri 01/06/2012 10:14:23

Previous topic - Next topic

WHAM

I am building my own functions to replace character.say, and at this time I am wondering how the default character.say -function really works?
As far as I can tell, the default .say -function first checks if there is a piece of audio strapped to the line. If there is, the engine waits until that audio finishes and then ends the .say -function. If no audio is set, AGS generates some sort of delay after which the line is skipped and the next one gets triggered.

Does anyone know how these default delays are calculated?
Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

Khris

According to this wiki page:

Code: ags
int gameloops = ((text.Length / game.text_speed) + 1) * GetGameSpeed();

WHAM

Ah, the wiki, I was looking over the manual but forgot about the wiki.
Thanks for the info, Khris! I'll make some tests and code something quite similiar, as I've felt the AGS build-in system generated the delays quite nicely.
Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

SMF spam blocked by CleanTalk