Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: SinSin on Fri 13/04/2007 21:58:56

Title: dialogue script (speed of dialogue???)
Post by: SinSin on Fri 13/04/2007 21:58:56
Hello folk its Sin the Problemed guy again

I was just wondering about if i can speed up a set characters speech speed
I want this person to say a word but i want each letter to appear one after the next like this
P
PE
PEO
PEOP
PEOPL
PEOPLE

Each letter gradulently spelling the word i want 
I have written the dialogue but when i test it each letter takes a letter  2 seconds apprx to appear   I was thinking more of a tenth of a second lol   any ideas folks ????

Sin
Title: Re: dialogue script (speed of dialogue???)
Post by: GarageGothic on Fri 13/04/2007 22:06:24
This is easier done by scripting a whole new speech funtion, at least if it's something you use more than once in the game. Yes, you can set the text speed with the game.text_speed variable, but the problem with that solution is that text change speed is also based on text length. In your case it would mean that the pause became longer for every letter added. A workaround could be to add spaces for the remaining letters ("P     ", "PE    ", "PEO   ", "PEOP  ", "PEOPL ") but I'm not sure how that registers in the engine. The text_speed would of course have to be set to normal before the full word is displayed or it will flash by in an instant.

Title: Re: dialogue script (speed of dialogue???)
Post by: SinSin on Fri 13/04/2007 22:09:04
i'l give it a go
Nope it didnt have the effect i would have liked thanx for trying tho
Title: Re: dialogue script (speed of dialogue???)
Post by: GarageGothic on Fri 13/04/2007 22:42:52
Too bad. I guess you'll have to write a function to do it for you (don't worry, it's not too hard). Perhaps this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=14437.0) can give some ideas.
Title: Re: dialogue script (speed of dialogue???)
Post by: ciborium on Sun 22/04/2007 00:02:02
What about this?


cEgo.Say ("P");
Wait(5);
cEgo.Say ("PE");
Wait(5);
cEgo.Say ("PEO");
Wait(5);
cEgo.Say ("PEOP");
Wait(5);
cEgo.Say ("PEOPL");
Wait(5);
cEgo.Say ("PEOPLE");
Title: Re: dialogue script (speed of dialogue???)
Post by: SupSuper on Sun 22/04/2007 00:10:11
Nah, the game would still stop accordingly for each Say() before the Wait(), so each letter would show up slower than the last.
Title: Re: dialogue script (speed of dialogue???)
Post by: strazer on Sun 22/04/2007 08:09:13
Then use a text overlay as described in the thread GG linked to.