My problem with the current code that I have is that upon completing Character A's (Guy on left), his picture unlocks fine in the main menu, but the big problem I have after is unlocking the other character's picture after completing character B (Girl on right) and other characters route. When I completed character B route and it takes me back to the main menu, I either have just her character picture but Character A's picture is gone or just character A's picture but Character B's picture never shows up despite completing her route.
This is the current code that I have.
'script.rpy'
Code: Select all
init python:
if not persistent.shal_route:
persistent.shal_route = False
if not persistent.jynn_route:
persistent.jynn_route = False
if not persistent.alex_route:
persistent.alex_route = False
if not persistent.everyone_ending:
persistent.everyone_ending = False
# The game starts here.
label start:
scene bg room
s "Hello, let's try testing."
s "Who do you love?"
menu:
"Shal":
jump shal_route
"Jynn":
jump jynn_route
"Alex":
jump alex_route
label shal_route:
$ persistent.shal_route = True
label jynn_route:
$ persistent.jynn_route = True
label alex_route:
$ persistent.alex_route = True
# This ends the game.
$ renpy.full_restart()
Code: Select all
screen main_menu():
tag menu
# This ensures that any other menu screen is replaced.
imagemap:
ground '/gui/menuimage/main_menu.png'
hotspot (522, 251, 722, 300) action Start()
hotspot (522, 315, 722, 363) action ShowMenu('load')
hotspot (522, 378, 722, 426) action ShowMenu('preferences')
hotspot (522, 443, 722, 492) action Help()
hotspot (522, 506, 722, 554) action Quit(confirm=False)
# The background of the main menu.
if (persistent.shal_route == True):
add "gui/menuimage/main_menu_shal.png"
elif (persistent.jynn_route == True):
add "gui/menuimage/main_menu_jynn.png"
elif (persistent.alex_route == True):
add "gui/menuimage/main_menu_alex.png"
else:
use main_menu_no_end
screen main_menu_no_end():
tag menu
imagemap:
ground '/gui/menuimage/main_menu.png'
hotspot (522, 251, 722, 300) action Start()
hotspot (522, 315, 722, 363) action ShowMenu('load')
hotspot (522, 378, 722, 426) action ShowMenu('preferences')
hotspot (522, 443, 722, 492) action Help()
hotspot (522, 506, 722, 554) action Quit(confirm=False)