Page 1 of 1

Showing text at a bunch of different positions

Posted: Sun Jul 08, 2018 3:39 pm
by parttimestorier
I'm still a beginner at Ren'Py, thanks in advance to anyone who can help me figure this out!

There's a part in a project I'm working on where I want a bunch of different lines of text to pop up at different parts of the screen. Here's a quick mockup of what I'm trying to accomplish:
example.png
example.png (2.72 KiB) Viewed 739 times
I want each line to appear individually, and then stay on the screen so that once all of them have appeared they look a little like that.

Initially, I thought about just making each line of text a separate image, since positioning images is easy. But that wouldn't really be ideal, because I think it's best if it still acts like normal text - then the reader can change the speed, or skip through it, or do whatever else they can normally do to control stuff in the textbox. So what would be easiest way for me to have all the different lines of text appear in different places like that?

Re: Showing text at a bunch of different positions

Posted: Sun Jul 08, 2018 8:21 pm
by Imperf3kt
You could make a text displayable and just show it at that position.
Example:

Code: Select all

image text_one = text("some words here")

label start:
    show text_one at center

I'm not entirely sure if thats the correct syntax for a text displayable, I'll have to check the documentation to be sure.


Here's the official documentation with examples:
https://www.renpy.org/doc/html/text.htm ... splayables

Re: Showing text at a bunch of different positions

Posted: Sun Jul 08, 2018 11:17 pm
by parttimestorier
Perfect, thanks!

Re: Showing text at a bunch of different positions

Posted: Mon Jul 09, 2018 3:43 pm
by parttimestorier
Okay, I followed the documentation and now my code looks a bit like this:

Code: Select all

show text "Blah blah blah." at textposition1
    
pause
    
show text "Words words words." at textposition2
    
pause
Unfortunately, each time it shows a new line, it seems to automatically hide the previous line, even though I didn't tell it to. Does anyone know a way to make all the lines continue to layer onto the screen all together until I tell it to hide them?

Re: Showing text at a bunch of different positions

Posted: Mon Jul 09, 2018 4:03 pm
by Remix
Untested, though should be right:

show text "Blah blah." as text_1 at position_1
show text "Blah blah." as text_2 at position_2

Using " as text_1 " and " as something_else " should tell Ren'Py not to reuse an existing displayable.

Re: Showing text at a bunch of different positions

Posted: Mon Jul 09, 2018 5:21 pm
by Imperf3kt
Remix wrote: Mon Jul 09, 2018 4:03 pm Untested, though should be right:

show text "Blah blah." as text_1 at position_1
show text "Blah blah." as text_2 at position_2

Using " as text_1 " and " as something_else " should tell Ren'Py not to reuse an existing displayable.
Was also going to suggest this.
You'll probably need to define text_01 still.
You should also need to hide text_01, opposed to hide text

Re: Showing text at a bunch of different positions

Posted: Mon Jul 09, 2018 10:36 pm
by parttimestorier
That works perfectly, thanks to both of you!