#๐ Game forced loading at a set point
8 messages ยท Page 1 of 1 (latest)
@alpine pike
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
init python:
if not hasattr(store, 'show_interactive_overlay'):
show_interactive_overlay = False
def set_overlay_state(state):
global show_interactive_overlay
show_interactive_overlay = state
if state:
renpy.show_screen("interactive_overlay")
else:
renpy.hide_screen("interactive_overlay")
def reset_overlay_state():
global show_interactive_overlay
current_screen = renpy.get_screen("interactive_overlay")
if current_screen is not None:
show_interactive_overlay = True
else:
show_interactive_overlay = False
def trigger_dialogue_1():
if show_interactive_overlay:
renpy.call_in_new_context("show_dialogue_1")
def trigger_dialogue_2():
if show_interactive_overlay:
renpy.call_in_new_context("show_dialogue_2")
def trigger_dialogue_3():
if show_interactive_overlay:
renpy.call_in_new_context("show_dialogue_3")
def trigger_dialogue_4():
if show_interactive_overlay:
renpy.call_in_new_context("show_dialogue_4")
transform small_scale:
zoom 0.3 ```
screen interactive_overlay():
if show_interactive_overlay:
imagebutton:
idle "Can_Placeholder.png"
hover "Can_Placeholder.png"
xpos 1000
ypos 0
at small_scale
action Function(trigger_dialogue_1)
imagebutton:
idle "Vent_Placeholder.png"
hover "Vent_Placeholder.png"
xpos 1300
ypos 0
at small_scale
action Function(trigger_dialogue_2)
imagebutton:
idle "Floor_Placeholder.png"
hover "Floor_Placeholder.png"
xpos 600
ypos 400
xsize 90000
ysize 90000
action Function(trigger_dialogue_3)
imagebutton:
idle "images/Door_Placeholder.png"
hover "images/Door_Placeholder.png"
xpos 1500
ypos -50
xsize 1280
ysize 360
action Function(trigger_dialogue_4)
label show_dialogue_1:
"{color=#00BFFF}A shelf of canned food. Just what I need.{/color}"
"{color=#00BFFF}Sucks for whatever sucker left it here, but I need something to eat.{/color}"
"{color=#00BFFF}...{/color}"
"{color=#00BFFF}......{/color}"
"{color=#00BFFF}Gross, canned fruit is always so syrupy, but at least it was filling.{/color}"
return
label show_dialogue_2:
"{color=#00BFFF}Some kinda vent.{/color}"
"{color=#00BFFF}Makes sense, even fallout bunkers need air.{/color}"
"{color=#00BFFF}Wait, is this where that gas came from?{/color}"
"{color=#00BFFF}...?{/color}"
"{color=#00BFFF}Smells bad, this is probably it.{/color}"
return
label show_dialogue_3:
"{color=#00BFFF}The floor. It's a floor, wow.{/color}"
"{color=#00BFFF}A hard one too, my back is killing me.{/color}"
return
label show_dialogue_4:
"{color=#00BFFF}That would be the door{/color}"
"{color=#00BFFF}Let's get out of here.{/color}"
jump prologue_3```
label prologue_2:
$ show_interactive_overlay = True
$ renpy.music.stop(channel='music')
$ renpy.music.play("Uplifting.mp3", channel='music')
scene bg Chrono_Intro with dissolve
show chrono neutral at center with dissolve
"{color=#00BFFF}...{/color}"
"{color=#00BFFF}What happened?{/color}"
"{color=#00BFFF}Did I die? I've never been afraid of death but I didn't think it would happen so soon.{/color}"
"{color=#00BFFF}I need to get my thoughts together maybe. Figure out what happened.{/color}"
"{color=#00BFFF}Starting with... My name. What is my name?{/color}"
"Well I... No, just call me Chrono. Chrono Prim, I like that."
"{color=#00BFFF}For a long time, I was a nobody, then I got this letter. So... I guess I'm classified as a Forensic Expert?{/color}"
$ renpy.movie_cutscene("Chrono Intro.webm")
"{color=#00BFFF}I love fashion and reality TV, and as of a few hours ago, my life has entirely fallen apart.{/color}"
"{color=#00BFFF}It all began with that evacuation siren. I had to flee everything and everyone I loved.{/color}"
"{color=#00BFFF}It's not like I had a choice, I didn't want to go. I could only hope my father got out alright. As for me, I ended up finding a bunker for safety, and then...{/color}"
"{color=#00BFFF}That gas, what did it do to me? Am I... Dreaming? I need to wake up, I have to get out of here.{/color}"
$ renpy.music.stop(channel='music')
scene black with dissolve
scene bg Bunker with dissolve
python:
renpy.pause(0.5)
renpy.show("black", at_list=[])
renpy.pause(0.5)
renpy.hide("black")
renpy.pause(0.5)
renpy.show("black", at_list=[])
renpy.pause(0.5)
renpy.hide("black")
"{color=#00BFFF}I'm alive?{/color}"
"{color=#00BFFF}This is the bunker, I'm still here.{/color}"
"{color=#00BFFF}I feel awful though. Was I sleeping for long? I'm starving, and... Eugh, I smell gross.{/color}"
"{color=#00BFFF}That fog in the air before I came in was almost toxic, was it still safe? I wasn't sure how long I was out but I needed to find my father.{/color}"
$ renpy.music.play("Investigation (1).mp3", channel='music')
show screen interactive_overlay
$ ui.interact()
python:
show_interactive_overlay = False
renpy.hide_screen("interactive_overlay")```
The scene is meant to work like this;
After a VN cutscene, it goes into an interactive environment to explore.
When the player selects the door, it ends the exploring and returns to VN as it jumps to the next label
This is working, but if you load the game from a set point beyond the interactive, it force returns to it and requires the player to click the door again
@alpine pike
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.