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.
show screen test_screen
pause
$renpy.transition(fade)
hide screen test_screen
show screen hook
show text "{color=#000}{cps=10} When the world calls, I come. I have come to save the world.{/color}{/cps}" onlayer over_screens
pause
hide text
with dissolve
$renpy.transition(pixellate)
...
I can't get the text to come off, even with hide text.
I think this is cuz of onlayer over_screens, but without it the text is hidden under screen hook and doesn't show up at all! How do I work through this?
Thanks!
Need more info about the shown screens and other stuff to say for sure.
Your code looks like it could improve, too. You might want to consider the on statement to fade screens when hidden.
Why isn't the text part of screen hook.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Imperf3kt wrote: ↑Mon Jan 28, 2019 2:32 am
Change zorder of screen, perhaps.
Need more info about the shown screens and other stuff to say for sure.
Your code looks like it could improve, too. You might want to consider the on statement to fade screens when hidden.
Why isn't the text part of screen hook.
I have already tried setting zorder to 1000, it doesn't work. Maybe I'm doing it wrong?
The screen above hook is a test screen and it's hidden, so I don't think it affects text.
Yes, I usually use with Transition(), I was testing $renpy.transition() here. How would 'on' work in this case though? I read the Transitions doc before but didn't really find it? (or maybe I didn't pay attention to it)
Thanks for the help!
default changing_text = "Fried Chicken"
screen test_screen() :
on Hide renpy.transition(fade) #may be an action
screen hook() :
zorder 50
image black
# image black should be defined within renpy internals, no need to define it
text "[changing_text]"
# use standard positioning arguments to align text, or place it in a container such as a vbox, fixed, grid, etc.
on Hide renpy.transition(pixellate)
label start:
show screen test_screen
pause
hide screen test_screen
window hide
show screen hook
$ changing_text = "{color=#000}{cps=10} When the world calls, I come. I have come to save the world.{/color}{/cps}"
pause
hide screen hook
window auto
You could also "call" a screen so you don't need to use pause, but then you need a way to close the screen.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
When it comes to onlayer, I noticed that you also have to mention what layer the thing you want to hide is on.
Because you have "text" set to "onlayer over_screens", instead of simply "hide text", it should now be
default changing_text = "Fried Chicken"
screen test_screen() :
on Hide renpy.transition(fade) #may be an action
screen hook() :
zorder 50
image black
# image black should be defined within renpy internals, no need to define it
text "[changing_text]"
# use standard positioning arguments to align text, or place it in a container such as a vbox, fixed, grid, etc.
on Hide renpy.transition(pixellate)
label start:
show screen test_screen
pause
hide screen test_screen
window hide
show screen hook
$ changing_text = "{color=#000}{cps=10} When the world calls, I come. I have come to save the world.{/color}{/cps}"
pause
hide screen hook
window auto
You could also "call" a screen so you don't need to use pause, but then you need a way to close the screen.
Cool, I'll try it out!
PS what does 'image black should be defined within renpy internals, no need to define it' mean? I should define it outside of the screen? Or is it already defined by renpy?
Imperf3kt wrote: ↑Mon Jan 28, 2019 9:23 am
That was a comment explaining why you don't need to define "image black" - it's already defined.
Oh and I haven't actually tested that code, so it might have some minor errors.
Hey, so I tried it today but I get an error " u'renpy' is not a keyword argument or valid child for the on statement.
on Hide renpy.transition(fade)
[/code]
Imperf3kt wrote: ↑Wed Jan 30, 2019 2:32 pm
Okay, it mustn't like renpy.transition(pixellate)
Remove the renpy. part, you may have to capitalise transition.
Note it's in the code twice.
Sorry but I can't get it to work... I tried all these combinations of capital/small letters, I still get the errors.
Wight wrote: ↑Mon Jan 28, 2019 6:22 am
When it comes to onlayer, I noticed that you also have to mention what layer the thing you want to hide is on.
Because you have "text" set to "onlayer over_screens", instead of simply "hide text", it should now be
This should make it work and have the text disappear.
Wow I completely missed your post! This works!! In retrospect, this seems so common sense, just like everything in programming is XD. Thanks m8 ^_^
@Imperfekt I'd still love to see how to get 'on' working, I remember trying to get it to work before too but it gave me the same errors, getting over this would help a lot in making transitions. Also, thanks for taking the time to help! I'd be so lost without you guys here on lemma XD
I think I gave bad advice, I'll review the code later when I get a chance, I see now where I went wrong, but currently haven't got the time to write up a proper example.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Imperf3kt wrote: ↑Thu Jan 31, 2019 2:56 am
I think I gave bad advice, I'll review the code later when I get a chance, I see now where I went wrong, but currently haven't got the time to write up a proper example.
It's okay, at least my problem's solved Have a great day