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.
I've started messing around with different stuff in Ren'Py, and I've created a screen which I would like to use for cutscenes, I was wondering, how can I make the dialog appear in the new screen, rather than the standard dialog boxes. As shown on the image posted, you'll see what I'm trying to ask, basically the screen just creates two black bars, top and bottom, and I want the dialog to go in the bottom black bar, instead of the dialog screen, like shown in the image.
Sorry, if my question isn't easy to understand, but I didn't know how else to ask.
The code I have so far is a very basic way of creating the screen:
screen cutscene_diag:
modal False
add "bargui_raise"
add "bargui_lower"
text "Example" xalign 0.5 ypos (put a number that can fit below the dialogue)
Thank you, but I think I wasn't clear enough, because, I want to constantly change that text, so much like when you click it changes the dialog, I want that dialog to also change, but in the same place, can I somehow define a variable for the text and then make it change every time I click?
You can pass arguments to a screen so it can be reused many times.
Can't test it out now but try modifying your screen like this (the code is untested!):
RicharDann wrote: ↑Wed Dec 18, 2019 1:16 pm
You can pass arguments to a screen so it can be reused many times.
Can't test it out now but try modifying your screen like this (the code is untested!):
That was it, thank you! I actually found that keeping the screen for the text separate made it a little bit easier to manage, but it still works great, so thanks again!
I only had to modify it slightly to work for how I needed it to be displayed, so here it is below, of course, thank you to RicharDann!
#We don't want the actual dialog box to appear on this screen
window hide
#Play the animation to display the black cutscene bars
show screen cutscene_diag
#This hard pause stops the user from clicking
$ renpy.pause(1, hard=True)
# How we place the text on the screen
$ renpy.show_screen('text_cut', txt="Hello")
# Wait before hiding and displaying the next piece of text
pause (2.0)
hide text_cut
pause (1.0)
$ renpy.show_screen('text_cut', txt="Hello!!!")
$ renpy.pause(2, hard=True)
#Fade the screens away
hide screen text_cut
with dissolve
hide screen cutscene_diag
with dissolve
$ renpy.pause(1, hard=True)