- Aug 13, 2021
- 7,332
- 20,084
I'm trying to automatically open a modal screen inside a current screen based on the value of a variable.
pseudo-example:
This is sort of a run once deal for code reusability. Is this possible? Open to other suggestions to achieve the same effect. Basically, player hits a point in the script where they reach a computer screen that has some image buttons. Before they can interact with anything, it checks if a variable is False. If False, a modal screen pops up that allows them to input a value. After input, modal closes and they are returned to the first screen, the computer screen.
Now that I'm typing this and thinking more...maybe I could use a renpy input. Something like this?
But even that wouldn't act like a modal and I would be able to interact with buttons underneath.
pseudo-example:
Python:
screen A():
#Do some stuff
if not name_set:
# Open the modal ScreenB
Now that I'm typing this and thinking more...maybe I could use a renpy input. Something like this?
Python:
if not name_set:
window:
modal True
style_prefix "entry"
text "Enter your username..."
input id "entry"
Last edited: