Is there any way to do a forced text speed/disable dialogue clickthrough?
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.
Is there any way to do a forced text speed/disable dialogue clickthrough?
I searched and found a few things similar to my issue, but not quite the same.
So what I'm trying to do is make a single line of dialogue slow and not allow the player to click so that the full line is shown. I want to have a sound effect coincide with one of the words, but that's impossible to do without a fixed text speed. I had thought a {cps} tag would do it, but that still allows you to click through the dialogue. I noticed there's a {fast} tag, but not a slow one.
I know there's a part in Doki Doki Literature Club where click through is disabled so it's not impossible, but I don't know if it's some crazy Python magic or something Ren'Py can already do.
Sorry if this is a really dumb question. I'm very new to this and don't really know a thing about code beyond the basic scripting.
So what I'm trying to do is make a single line of dialogue slow and not allow the player to click so that the full line is shown. I want to have a sound effect coincide with one of the words, but that's impossible to do without a fixed text speed. I had thought a {cps} tag would do it, but that still allows you to click through the dialogue. I noticed there's a {fast} tag, but not a slow one.
I know there's a part in Doki Doki Literature Club where click through is disabled so it's not impossible, but I don't know if it's some crazy Python magic or something Ren'Py can already do.
Sorry if this is a really dumb question. I'm very new to this and don't really know a thing about code beyond the basic scripting.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3785
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Is there any way to do a forced text speed/disable dialogue clickthrough?
You can easily achieve this through ATL
Give Ren'Py the displayable (text), add a hard pause, set a sound to play at a given moment, combine it.
I'd give you a better example, but I mostly read this forum via my phone which makes giving examples both hard and time consuming.
Give Ren'Py the displayable (text), add a hard pause, set a sound to play at a given moment, combine it.
I'd give you a better example, but I mostly read this forum via my phone which makes giving examples both hard and time consuming.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Is there any way to do a forced text speed/disable dialogue clickthrough?
This is the way to make it so that clicking doesn't show the full text. You need to add, what_slow_abortable=False.
This code is from my game.
Note, that setting slow_abortable to False won't stop the player from clicking in general...they can still click through. It just won't click so the full line is shown. If you want to remove the ability for the player to click through in general (which isn't recommended), there are a few options you can use to do that.
This code is from my game.
Code: Select all
define barb = Character('[barb_name]', color="#994411", what_color="#FFFFCC",
what_slow_cps=20, what_slow_abortable=False, callback=arrow)
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Re: Is there any way to do a forced text speed/disable dialogue clickthrough?
I can do a hard pause while the dialogue is going? Or will I have to define it with a new character?Imperf3kt wrote: ↑Wed Feb 07, 2018 9:10 pm You can easily achieve this through ATL
Give Ren'Py the displayable (text), add a hard pause, set a sound to play at a given moment, combine it.
I'd give you a better example, but I mostly read this forum via my phone which makes giving examples both hard and time consuming.
Sorry if I'm not understanding this right. Hard to fully know without an example.
This just gives me an error when I leave callback=arrow in, and it doesn't do anything different than just a cps tag when I take it out. A click still shows the full line.trooper6 wrote: ↑Wed Feb 07, 2018 9:30 pm This is the way to make it so that clicking doesn't show the full text. You need to add, what_slow_abortable=False.
This code is from my game.Note, that setting slow_abortable to False won't stop the player from clicking in general...they can still click through. It just won't click so the full line is shown. If you want to remove the ability for the player to click through in general (which isn't recommended), there are a few options you can use to do that.Code: Select all
define barb = Character('[barb_name]', color="#994411", what_color="#FFFFCC", what_slow_cps=20, what_slow_abortable=False, callback=arrow)
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3785
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Is there any way to do a forced text speed/disable dialogue clickthrough?
Well that all depends on exactly what you're trying to achieve.
Where is this text? In the say window? Why do you need it unskippable? Is anything else showing? Etc etc.
Where is this text? In the say window? Why do you need it unskippable? Is anything else showing? Etc etc.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Re: Is there any way to do a forced text speed/disable dialogue clickthrough?
Yeah, it's the say window. It's just a single short line:
Code: Select all
f "Your full name is Jack _______"
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Is there any way to do a forced text speed/disable dialogue clickthrough?
Create a brand new project and put all of this code in it exactly.
Then try it out and see the differences between the 4 different versions of characters.
I assume what you want is version 4.
Then try it out and see the differences between the 4 different versions of characters.
I assume what you want is version 4.
Code: Select all
define a = Character('Alpha', color="#994411", what_color="#FFFFCC",
what_slow_cps=20,)
define b = Character('Bravo', color="#994411", what_color="#FFFFCC",
what_slow_cps=20, what_slow_abortable=False)
define c = Character('Charlie', color="#994411", what_color="#FFFFCC",
what_slow_cps=20, callback=no_inter)
define d = Character('Delta', color="#994411", what_color="#FFFFCC",
what_slow_cps=20, what_slow_abortable=False, callback=no_inter)
default can_cont = True
init -1 python:
def say_blocking(): #allow dismissing only if can_cont
global can_cont
return can_cont
config.say_allow_dismiss = say_blocking
def no_inter(event, **kwargs):
global can_cont
if event == "show" or event == "begin":
can_cont = False
if event == "slow_done" or event == "end":
can_cont = True
renpy.restart_interaction()
# The game starts here.
label start:
a "This is what it looks like when there is a character without slow_abortable
false and without dismising being blocked. Because you can abort and dismiss,
when you click, the rest of the text will finish. Click again and you go on to the next person."
b "This is what it looks like when there is a character with slow_abortable
false and without dismising being blocked. Clicking will immediately bring you to the next person."
c "This is what it looks like when there is a character without slow_abortable
false and with dismising being blocked. You can't dismiss until the text finishes,
however, you can you click to finish the text. Then you click again to dismiss."
d "This is what it looks like when there is a character with slow_abortable
false and with dismising being blocked. You can't click to get the full text and you can't dismiss until the text is finished."
"Game over."
return
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
Re: Is there any way to do a forced text speed/disable dialogue clickthrough?
Oh my god, thank you so much! Works now. Yeah, d is what I wanted there.trooper6 wrote: ↑Thu Feb 08, 2018 1:15 am Create a brand new project and put all of this code in it exactly.
Then try it out and see the differences between the 4 different versions of characters.
I assume what you want is version 4.
Code: Select all
define a = Character('Alpha', color="#994411", what_color="#FFFFCC", what_slow_cps=20,) define b = Character('Bravo', color="#994411", what_color="#FFFFCC", what_slow_cps=20, what_slow_abortable=False) define c = Character('Charlie', color="#994411", what_color="#FFFFCC", what_slow_cps=20, callback=no_inter) define d = Character('Delta', color="#994411", what_color="#FFFFCC", what_slow_cps=20, what_slow_abortable=False, callback=no_inter) default can_cont = True init -1 python: def say_blocking(): #allow dismissing only if can_cont global can_cont return can_cont config.say_allow_dismiss = say_blocking def no_inter(event, **kwargs): global can_cont if event == "show" or event == "begin": can_cont = False if event == "slow_done" or event == "end": can_cont = True renpy.restart_interaction() # The game starts here. label start: a "This is what it looks like when there is a character without slow_abortable false and without dismising being blocked. Because you can abort and dismiss, when you click, the rest of the text will finish. Click again and you go on to the next person." b "This is what it looks like when there is a character with slow_abortable false and without dismising being blocked. Clicking will immediately bring you to the next person." c "This is what it looks like when there is a character without slow_abortable false and with dismising being blocked. You can't dismiss until the text finishes, however, you can you click to finish the text. Then you click again to dismiss." d "This is what it looks like when there is a character with slow_abortable false and with dismising being blocked. You can't click to get the full text and you can't dismiss until the text is finished." "Game over." return
Who is online
Users browsing this forum: No registered users