get the length of displayed "what" text in say

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Kia
Eileen-Class Veteran
Posts: 1011
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

get the length of displayed "what" text in say

#1 Post by Kia » Fri Mar 05, 2021 2:18 pm

can I get the length of how much of the text have been displayed when the text is being typed in slow caps?

User avatar
zmook
Veteran
Posts: 421
Joined: Wed Aug 26, 2020 6:44 pm
Contact:

Re: get the length of displayed "what" text in say

#2 Post by zmook » Fri Mar 05, 2021 4:23 pm

I'm really curious the answer to this question, since I think it must require understanding how slow-text animation actually works.

What I can find is that Text displayables have a slow_text property, which seems to be a list of text segments that have not yet been displayed.
colin r
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM

User avatar
itoril
Newbie
Posts: 7
Joined: Mon May 25, 2020 6:04 pm
Projects: Wild Harem
Skype: itorilfur
itch: itoril
Contact:

Re: get the length of displayed "what" text in say

#3 Post by itoril » Tue Apr 27, 2021 11:47 pm

Hmm. I'm hoping to figure this out as well, because I'm trying to synchronise movie displayables to the length of sentences spoken by characters. I hoped I'd be able to read the length of a sentence in characters then divide it by the CPS. That result would tell me which length(s) of movie clip(s) to use so they loop seamlessly.

Did either of you manage to make any progress on this?

User avatar
Kia
Eileen-Class Veteran
Posts: 1011
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: get the length of displayed "what" text in say

#4 Post by Kia » Wed Apr 28, 2021 2:03 am

Not yet, I was busy with few other tasks and haven't had the time to come back to this issue yet, I'll let you know once I got any results.

Post Reply

Who is online

Users browsing this forum: No registered users