[SOLVED] How do I hide load game button?
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.
[SOLVED] How do I hide load game button?
I try to hide "load game" button by using persistent but it's not work.
I use image map like this.
If hide load game
-New Game
-Settings
-Quit
If not hide load game
-New Game
-Continue
-Settings
-Quit
I put $ persistent.save_unlocked = True in Screen Save (and disabled quick save in quick menu)
It look like work.But when I try to delete save file,The problem come.
It's still have continue button.
Can I hide load game button when no save file in save directories? How to do it?
And last question Can I make single save game slot? How to do it?
Edit: Single Game slot mean you can have one slot to save (and it select automatic when click save/load button)
Thanks & Sorry for my bad English.
I use image map like this.
If hide load game
-New Game
-Settings
-Quit
If not hide load game
-New Game
-Continue
-Settings
-Quit
I put $ persistent.save_unlocked = True in Screen Save (and disabled quick save in quick menu)
It look like work.But when I try to delete save file,The problem come.
It's still have continue button.
Can I hide load game button when no save file in save directories? How to do it?
And last question Can I make single save game slot? How to do it?
Edit: Single Game slot mean you can have one slot to save (and it select automatic when click save/load button)
Thanks & Sorry for my bad English.
Last edited by BigHa on Mon Jan 20, 2014 1:01 pm, edited 2 times in total.
Re: How do I hide load game button and make single save slot
Hiding the load button might be a little harder using image maps, because you'd need to switch your image map and definitions depending on a variable. Not using image maps, I could easily tell you how to do this.
If you only want one slot, THIS might be easier to do with an image map, because you'd only put one slot on your image map for the load and save screens. Normally, I'd say to abandon regular load/save entirely and just use quick load and quick save since you want it to automatically be chosen... but I notice that even that has 10 slots for some odd reason, and I haven't really used quick saving at all to understand how it works. Maybe something to look into though if you can get a quick save that only works on the same one slot.
I know you can also do manual saving from renpy.save: http://www.renpy.org/wiki/renpy/doc/ref ... renpy.save so another option is to re-code your save button to use this and your load button to use the load equivalent, giving you more control over how saves/loads are done.
If you only want one slot, THIS might be easier to do with an image map, because you'd only put one slot on your image map for the load and save screens. Normally, I'd say to abandon regular load/save entirely and just use quick load and quick save since you want it to automatically be chosen... but I notice that even that has 10 slots for some odd reason, and I haven't really used quick saving at all to understand how it works. Maybe something to look into though if you can get a quick save that only works on the same one slot.
I know you can also do manual saving from renpy.save: http://www.renpy.org/wiki/renpy/doc/ref ... renpy.save so another option is to re-code your save button to use this and your load button to use the load equivalent, giving you more control over how saves/loads are done.
Re: How do I hide load game button and make single save slot
Thanks! Crazy Li
But I still have some troubles.
Save and Load is work but I can't use renpy.can_load (filename): to check if save file exist. If file exist it'll show load game button.
When I use renpy.can_load (filename): it return false all the time.
But I still have some troubles.
Save and Load is work but I can't use renpy.can_load (filename): to check if save file exist. If file exist it'll show load game button.
When I use renpy.can_load (filename): it return false all the time.
-
Kinsman
- Regular
- Posts: 130
- Joined: Sun Jul 26, 2009 7:07 pm
- Location: Fredericton, NB, Canada
- Contact:
Re: [Still need help] How do I hide load game button?
The quick save always uses one slot, as far as I can tell after looking at the Ren'Py code.
Try this code to see if the quick-save exists or not:
Try this code to see if the quick-save exists or not:
Code: Select all
python:
# Get the timestamp of the quick-save. If you can, the file exists.
def save_exists():
timestamp = FileTime(1,page="quick")
if (timestamp == ""):
return False
else:
return True
Flash To Ren'Py Exporter
See the Cookbook thread
See the Cookbook thread
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: [Still need help] How do I hide load game button?
is probably the best way to test for a quickload file.renpy.can_load("quick-1")
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
Re: [Still need help] How do I hide load game button?
Thanks you everyone. Finally, I use save and load like this.
init python:
def datasave():
renpy.save("quick-1")
ui.text('Quicksave successful!')
def dataload():
if renpy.can_load("quick-1"):
renpy.load("quick-1")
else:
ui.text('Quickload Fails!')
in image map menu
hotspot (568, 549, 627, 571) action datasave
hotspot (654, 549, 716, 571) action dataload
main menu check conidition
if renpy.can_load("quick-1"):
in script.rpy
when start game (new game)
$ _game_menu_screen = None # To stop player from access old save/load menu
$ renpy.unlink_save("quick-1") # To remove old save data if player select new game
init python:
def datasave():
renpy.save("quick-1")
ui.text('Quicksave successful!')
def dataload():
if renpy.can_load("quick-1"):
renpy.load("quick-1")
else:
ui.text('Quickload Fails!')
in image map menu
hotspot (568, 549, 627, 571) action datasave
hotspot (654, 549, 716, 571) action dataload
main menu check conidition
if renpy.can_load("quick-1"):
in script.rpy
when start game (new game)
$ _game_menu_screen = None # To stop player from access old save/load menu
$ renpy.unlink_save("quick-1") # To remove old save data if player select new game
Who is online
Users browsing this forum: Google [Bot]