Completely lost trying to make a frame with a scrollbar

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
User avatar
Posts: 69
Joined: Sat Dec 17, 2016 3:39 am
Projects: A Town Uncovered
itch: geeseki

Completely lost trying to make a frame with a scrollbar

#1 Post by GeeSeki » Mon Oct 15, 2018 3:24 am

I searched around and tried to learn as much as I can but I'm still lost with this.

I'm trying to achieve a few things but I have no idea how.

This is my code at the moment.

Code: Select all

screen scr_mybedroompc_changelog:
    vbox xalign 0.5 yalign -0.2:
            side ("c r"):
                area (5, 5, 1500, 800)
                viewport id "changelog_list":
                    draggable True mousewheel True
                    text "This is my text."
                vbar value YScrollValue("changelog_list")
        null height 1000
And it gives me this result:


1. How do I get rid of the background so it's basically transparent and only shows the text and the scrollbar? I want to use my own PNG background.

2. How do I even create lines of dialogue?

When I try this, it does not work. It gives me an error and crashes the game:

Code: Select all

text "This is my text.\n
      This is my text on line 2.\n
      This is my text on line 3."
3. What does null height and viewport id even do?

User avatar
Lemma-Class Veteran
Posts: 2373
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor

Re: Completely lost trying to make a frame with a scrollbar

#2 Post by Imperf3kt » Mon Oct 15, 2018 4:09 am

A null is an empty object. If you specify a height of 1000, then you are essentially putting in a blank area of 1000 pixels.

Instead of a frame, you might consider a vpgrid, which is easier to use in my opinion.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Post Reply

Who is online

Users browsing this forum: No registered users