[SOLVED] Autosave & Autoload only once?

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.
Post Reply
Message
Author
nairi_0
Newbie
Posts: 5
Joined: Wed Oct 04, 2023 1:40 pm
Contact:

[SOLVED] Autosave & Autoload only once?

#1 Post by nairi_0 »

(btw I'm a very beginner programmer so i apologize for how messy this reads... ;;)

is that possible? if the player makes a very intentional choice (a reference to another game) the game quits. I want the game to pick up at another label once launched while skipping main menu & keeping quick menu (so not like splashscreen where all functions disappear)

it's a 4th wall breaking moment,
like ddlc or undertale (not a renpy game but I've seen some renpy undertale fangames do this!)
where it expects the player to launch game soon after it "crashes", but i want to avoid the main menu because i don't want the choice of seeing anything else after triggering this.

+ the game is short so it shouldn't be that big of a problem

i wrote about the problem i had a bit ago and the conclusion i reached after trying codes & searching on the forum for hours is that i am trying to autoload ! but the only ways i have found to autoload has been very permanent, i couldn't attach a persistent variable to it, it was either on all the time or off all the time. and it would autosave every line instead of just the one line i put force autosave on.

how do i make it a one-time event triggered by 1 persistent variable at ONE place...?

the best way i worked around this has been just jumping to the label after the start label & menu, but that is not the desired effect : ( if what I'm asking for is too unintellegible/difficult, then I'll just stick to my workaround, but i would be very happy if i could execute this the way i intended : (

thank you regardless
Last edited by nairi_0 on Thu Apr 11, 2024 4:53 am, edited 2 times in total.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2410
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Autosave & Autoload only once?

#2 Post by Ocelot »

Something like:

Code: Select all

label main_menu:
    if persistent.scary_thing:
        $ renpy.run( Start('scary_label') )
    else:
        show screen main_menu
        pause
    return
Then you could turn off flag in the scary_label.
< < insert Rick Cook quote here > >

nairi_0
Newbie
Posts: 5
Joined: Wed Oct 04, 2023 1:40 pm
Contact:

Re: Autosave & Autoload only once?

#3 Post by nairi_0 »

Ocelot wrote: Tue Apr 09, 2024 3:08 am Something like:

Code: Select all

label main_menu:
    if persistent.scary_thing:
        $ renpy.run( Start('scary_label') )
    else:
        show screen main_menu
        pause
    return
Then you could turn off flag in the scary_label.
it worked!!!!! this is magic to me omg thank you so much!!

Post Reply

Who is online

Users browsing this forum: No registered users