[Solved] Continue game from last save
Posted: Tue Sep 11, 2018 4:02 pm
I wanted to make "Continue" button to load last saved game. After checking forum I found this and used it in my game which works as intendet. The problem is that button "Continue" is always in selected state and hovering on it doesn't change it's state nor it goes to idle state. Any solution for that?
Here is whole code:
Here is whole code:
Code: Select all
screen main_menu:
tag menu
add "images/gui/gui_ground.png"
add "images/gui/title.png" anchor(1.0, 0.0) pos(787,18)
imagemap:
ground Null()
idle "images/gui/main_menu_idle.png"
hover "images/gui/main_menu_hover.png"
selected_idle "images/gui/main_menu_selected.png"
selected_hover "images/gui/main_menu_selected.png"
alpha False
$ lastsave=renpy.newest_slot(r"\d+")
if lastsave is not None:
$ name, page = lastsave.split("-")
hotspot(622,275,150,45) action FileLoad(name, page)
hotspot(622,325,150,45) action Start()
hotspot(622,375,150,45) action ShowMenu("load")
hotspot(622,425,150,45) action ShowMenu("extra")
hotspot(622,475,150,45) action ShowMenu("options")
hotspot(622,525,150,45) action Quit(confirm=True)
key "K_ESCAPE" action Quit(confirm=True)