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.
-
Shocking Alberto
- Regular
- Posts: 35
- Joined: Sun Mar 29, 2020 4:58 am
-
Contact:
#1
Post
by Shocking Alberto » Fri Apr 24, 2020 6:40 am
I've got another interesting problem that came up.
What I'm trying to do is display some text at some point in the middle of a video file being played. Code would look something like this:
Code: Select all
# Movie is 10 sec long
show some_movie1
$renpy.pause(5.0, hard='True')
"Something was said in the middle of this movie!"
$renpy.pause(5.0, hard='True')
show some_othermovie1
The problem is that after the movie finishes playing, the game sits there and without clicking, it won't transition to the next video file. Just to be sure, I commented out the line of text and it transitions without issue to the next video file.
I'm still thinking up solutions to this including possibly just cutting the video file in half and having the second half play after the text line displays but any suggestions are appreciated. /o/
Last edited by
Shocking Alberto on Sat Apr 25, 2020 12:28 am, edited 1 time in total.
-
rames44
- Veteran
- Posts: 232
- Joined: Sun May 29, 2016 4:38 pm
-
Contact:
#2
Post
by rames44 » Fri Apr 24, 2020 1:02 pm
Obviously, when you display a line of text this way, it waits for a user interaction.
However, under the hood, this uses the “say” screen. There’s no reason you couldn’t “show” the “say” screen manually, with the text you want shown, and then hide it again after a pause. It’s not the screen itself that generates the interaction, so that should work.
-
Shocking Alberto
- Regular
- Posts: 35
- Joined: Sun Mar 29, 2020 4:58 am
-
Contact:
#3
Post
by Shocking Alberto » Fri Apr 24, 2020 3:14 pm
I didn't even think of that! Good call on using "show" instead but I end up with a slightly different problem as using "show" apparently has different rules than "say" when it comes to transparency. I use a slightly transparent textbox and thus the text isn't 100% opaque like it normally would be.
I guess I'll do some more searching to figure out a solution or some other workaround but I appreciate the tip!
Edit: I really should read the documentation more... So if you use "show" instead, it treats the text as if it were an image so if you have a transparent textbox then it will reflect that. This probably means that "show" isn't the option I'm looking for so part of me feels it might just be best to split the video in half and wait for user input at the end of that line before advancing to the next video. I'll keep looking around for ideas but that's probably my best bet at this point.
-
Shocking Alberto
- Regular
- Posts: 35
- Joined: Sun Mar 29, 2020 4:58 am
-
Contact:
#4
Post
by Shocking Alberto » Sat Apr 25, 2020 12:27 am
Well, I guess there's still a lot about Renpy I haven't figured out yet and once again, I need to read the documentation...
The problem was solved by using onlayer and setting the text "image" in the overlay layer... and thus would appear above the textbox.
Problem solved. \o/