How to display narrative text in alternating positions?

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.
Post Reply
Message
Author
LittleViktoria
Newbie
Posts: 7
Joined: Wed Nov 14, 2018 6:41 am
Deviantart: littleviktoria
Contact:

How to display narrative text in alternating positions?

#1 Post by LittleViktoria »

I want to create a storybook-like game. There will be painted scenes that leave space on one side for narration.

On some images, this narration will go on the left side, on others the right side, like in these pictures.

Image
Image

There is no need for a textbox background image, since the story images will be painted in a way that leaves room for the text.

Basically it will be nvl-like narration, but with two or more positions that the text can be placed, based on the situation.

How do I define two textboxes like this, and how do I use them in the game? Ideally I would want to define two narrator characters that display on either side, like this:

Code: Select all

scene bg home

narratorLeft "It was a sunny morning. A perfect day to pick blueberries."

scene bg forest

narratorRight "She hadn't been to this part of the forest before."
Thank you in advance for the help!

LittleViktoria
Newbie
Posts: 7
Joined: Wed Nov 14, 2018 6:41 am
Deviantart: littleviktoria
Contact:

Re: How to display narrative text in alternating positions?

#2 Post by LittleViktoria »

I think I managed to do it just with characters:

Code: Select all

define nLeft = Character(None, what_color="#5D4A44", window_background=None, window_xalign=0.1, window_yalign=0.5,
window_xpadding=0, window_ypadding=0, window_xsize=640, window_ysize=900, what_xpos=0, what_ypos=0)

define nRight = Character(None, what_color="#5D4A44", window_background=None, window_xalign=0.9, window_yalign=0.5,
window_xpadding=0, window_ypadding=0, window_xsize=640, window_ysize=900, what_xpos=0, what_ypos=0)
Now, is there some way that I could have them display multiple items of narration at once, like the nvl mode does?

For example, to display a paragraph of text, and when the player clicks, to display the next paragraph underneath the first one, and only to clear the text with a command like "nvl clear"?


Post Reply

Who is online

Users browsing this forum: Google [Bot]