Thanks
How to create a pause after every period and comma?
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.
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.
How to create a pause after every period and comma?
I know that I can just insert a wait tag after every period/comma, but I was wondering if there was a way I could just define something and have the system do it for me automatically?
Thanks
Thanks
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: How to create a pause after every period and comma?
Code: Select all
init python:
def alter_say_strings( str_to_test ):
str_map = {
". " : ". {w=0.75}",
", " : ", {w=0.45}",
}
for key in str_map:
str_to_test = str_to_test.replace( key, str_map[ key ] )
return str_to_test
define config.say_menu_text_filter = alter_say_stringsFrameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Re: How to create a pause after every period and comma?
Just to add - this is going to cause bad UX when your sentence ends with a . and players have to click twice to proceed and think the game's semi-froze. Also you'll have to consider situations like ... (although you can replace that with ellipses (…) providing your font supports it.
Re: How to create a pause after every period and comma?
That's true. I think I'll just use Remix's code and get rid of the part for the periods. Need be, I can just manually put in the wait tags after periods so that players don't get confused/annoyed.
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: How to create a pause after every period and comma?
You might note that mine *only* replaces commas or periods that are immediately followed by a space, so it should not affect any end of line period (unless that was followed by a space)
You could tweak it to only replace those followed by two spaces, then you could just type:
Code: Select all
eileen "Some words with no pause as only one space after the period. Some with a pause as typed two spaces. More with a pause. None at end."Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Re: How to create a pause after every period and comma?
Ah, sorry didn't spot that! Remix always thinking way ahead of us 
Who is online
Users browsing this forum: No registered users