I want to have a screen for credits that's available off the main menu. I can do a static screen with scroll bars, but what I really want is a screen that scrolls. I've seen examples that make use of a label, but I'd prefer to have a standalone screen to do this. Any tips on how to get a screen to scroll?
I already have a working credits screen, but it doesn't scroll on it's own. The methods used to auto-scroll are to "say" text into the main game window, one line at a time with a delay. Am I missing something basic, can I "say" into a specific screen?
How to do a scrolling screen for credits?
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.
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.
- SuperbowserX
- Veteran
- Posts: 270
- Joined: Sat Jan 07, 2017 3:09 pm
- Contact:
Re: How to do a scrolling screen for credits?
IDK how to answer this because I haven't worked with credits aha. Google is your best friend for Ren'py related help. In this case, search "renpy credits" or "renpy scrolling image" to find other posts by other users on this topic, i.e. this one: viewtopic.php?f=51&t=22481
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: How to do a scrolling screen for credits?
Something like this?
Code: Select all
## ATL for scrolling screen object. In this case, credits roll.
## Speed is the time for object to move up from initial ypos to finish ypos.
transform credits_scroll(speed):
ypos 720
linear speed ypos -720
## Credits screen.
screen credits():
style_prefix "credits"
add "#000"
frame at credits_scroll(5.0):
background None
xalign 0.5
vbox:
label "Credits"
null height 20
hbox:
text "Role 1"
text "NAME 1"
hbox:
text "Role 2"
text "NAME 2"
style credits_hbox:
spacing 40
ysize 30
style credits_label:
xalign 0.5
style credits_text:
xalign 0.5
## Show credits screen.
label start:
call screen credits
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: How to do a scrolling screen for credits?
That looks far better than the old code I was using.
Does it have the 10 second lag like the old code by Leon?
Does it have the 10 second lag like the old code by Leon?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: How to do a scrolling screen for credits?
I have no idea about the old code and whatever cause the lag. The code above simply creates a credits screen, and ATL transform initially put it outside the windows. In this case, my guess of the window height is 720 pixels from the top. Then move them up from ypos 720 to -720 within "speed" which in the example I put in 5.0 seconds.Imperf3kt wrote:That looks far better than the old code I was using.
Does it have the 10 second lag like the old code by Leon?
On a side note, you can also add "timer" to credits screen to see how long the credits will show for before return.
Code: Select all
timer 5.0 action Return()
- dvemail
- Regular
- Posts: 35
- Joined: Sat May 28, 2016 1:50 pm
- Projects: Working on Patronus
- IRC Nick: dvemail
- Deviantart: ObdurateDemand
- Github: dvemail
- Contact:
Re: How to do a scrolling screen for credits?
Divona wrote:Something like this?Code: Select all
## ATL for scrolling screen object. In this case, credits roll. ## Speed is the time for object to move up from initial ypos to finish ypos. transform credits_scroll(speed): ypos 720 linear speed ypos -720 ## Credits screen. screen credits(): style_prefix "credits" add "#000" frame at credits_scroll(5.0): background None xalign 0.5 vbox: label "Credits" null height 20 hbox: text "Role 1" text "NAME 1" hbox: text "Role 2" text "NAME 2" style credits_hbox: spacing 40 ysize 30 style credits_label: xalign 0.5 style credits_text: xalign 0.5 ## Show credits screen. label start: call screen credits
This worked perfectly! thanks!
Who is online
Users browsing this forum: henne