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.
-
jack_norton
- Lemma-Class Veteran
- Posts: 4067
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
-
Contact:
#1
Post
by jack_norton » Sat Jan 22, 2011 6:12 am
In PS I use several layers for interface, battle messages, etc.
Now when I get into load/save screen I had some bugs, like this:
I solved it by clearing all the layers one by one:
Code: Select all
python:
renpy.hide("Toolz")
if in_combat:
ui.layer("interface")
ui.clear()
ui.close()
ui.layer("battlemsg")
ui.clear()
ui.close()
was wondering though if there was a better way to just clear all layers at once with one single command ? Or there's no solution to this except doing what I did ? thanks

-
PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
-
Contact:
#2
Post
by PyTom » Sat Jan 22, 2011 9:53 am
You can do either:
Code: Select all
scene layer "interface"
scene layer "battlemsg"
or use renpy.scene for the equivalent.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama •
https://www.patreon.com/renpytom
-
jack_norton
- Lemma-Class Veteran
- Posts: 4067
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
-
Contact:
#3
Post
by jack_norton » Sat Jan 22, 2011 10:14 am
Haha lol was enough to use renpy.scene() thanks

-
jack_norton
- Lemma-Class Veteran
- Posts: 4067
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
-
Contact:
#4
Post
by jack_norton » Sat Jan 22, 2011 10:24 am
Hm I still see them in preferences. I clear them in the load/save, but preferences still shows them. I was using _game_menu_preferences="battleprefs" to do operations before jumping into the normal screen but it never reads that label, is the correct one to use?
-
PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
-
Contact:
#5
Post
by PyTom » Sat Jan 22, 2011 10:39 am
You probably want to look into config.menu_clear_layers.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama •
https://www.patreon.com/renpytom
-
jack_norton
- Lemma-Class Veteran
- Posts: 4067
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
-
Contact:
#6
Post
by jack_norton » Sat Jan 22, 2011 11:06 am
Ah wow, didn't even know that such command existed! Amazing, all problems solved with 1 line

Users browsing this forum: No registered users