Question about checking for a save and autoloading that save.

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
Arkthos
Newbie
Posts: 1
Joined: Mon Oct 09, 2017 6:46 pm
Contact:

Question about checking for a save and autoloading that save.

#1 Post by Arkthos »

Hi, I've just been getting started with Ren'py and was attempting to make something that might be a bit beyond me.
I've set this up
init python:
config.has_autosave = True
config.autosave_slots = 1
config.autosave_on_choice = True
config.autosave_on_quit = True


label main_menu:
return
And this seems to work fine. It skips the opening menu and sets up the autosave and skips the main menu. What I'd like the game to do is on starting up check to see if there is a saved game and if so load it and if not display an intro scene. I had a go at this but it is probably very nooby and laughable
# The game starts here.
label start:

if renpy.can_load(1, test=False) == False:
e "This is the text if you are starting the game for the first time!"
else:
renpy.load(1)
I was wondering if anyone would give me some pointers on how I can work towards achieving this and learning how it all works.
Thank you.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]