I want to add a permanent frame to my game. It may apply to the whole game (main menu, game menu, ingame) but for now I want at least to cover the ingame.
However, I could find no ingame root screen, unlike main_menu and game_menu. Since my game used NVL mode, the closest I could find was the nvl screen, but it disappears when the nvl box disappears.
Attachments:
- screenshot 1 shows what I want with a frame around the whole screen
- screenshot 2 shows what happens if I stop using the default narrator (in my case, nvl_narrator): the frame disappears
How can I make the frame stick around for at least the whole ingame part? (then I could add it to main_menu and game_menu to make it stay for the whole game)
Should I add some Renpy/Python action to `show` the frame image on game start, then remove it on game end? It seems more elegant to use the available screens.
Permanent root screen for ingame content that stays when say/nvl text boxes disappear
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.
Re: Permanent root screen for ingame content that stays when say/nvl text boxes disappear
I would try it with a function, depending on the condition of a variable displays the screen or not (there may be situations in which you don't want to display the image/frame).
Code: Select all
init python:
def overlay_frame():
if show_myframe:
renpy.show_screen("always_frame", _layer= "master")
else:
renpy.hide_screen ("always_frame", _layer= "master")
return
config.overlay_functions.append(overlay_frame)
default show_myframe = True # set to false to not show the frame
screen always_frame():
## not sure if you even need the frame option for this
frame:
add "the_image_name"
label start:
$ show_myframe = True
"Here we show the frame"
$ show_myframe = False
"An here we don't show it"
return
Why on earth did I put the bread in the fridge?
- komehara
- Regular
- Posts: 37
- Joined: Fri Jan 31, 2020 10:08 pm
- Projects: Spirit Link
- Tumblr: hsandt
- Deviantart: hsandt
- Github: hsandt
- itch: komehara
- Contact:
Re: Permanent root screen for ingame content that stays when say/nvl text boxes disappear
Thanks, so using a screen would give me more control.
In the meantime I tried something simple: just show the image (on a custom layer above screens) on script start, and just let it for the rest of the game. It's working well so far.
If I need to hide it dynamically without having to call hide statements each time, I'll try the screen method.
In the meantime I tried something simple: just show the image (on a custom layer above screens) on script start, and just let it for the rest of the game. It's working well so far.
If I need to hide it dynamically without having to call hide statements each time, I'll try the screen method.
Who is online
Users browsing this forum: Google [Bot]