My problem is that I can't seem to find what I'm looking for in the "documentation" part of the Ren'Py website, so I'm using the older methods that I find in various tutorials and wiki pages.
Anyway, the actual problem at hand is:
I'm trying to make a gallery. So I put in the new_gallery.rpy file and started to customize an imagemap for the main menu.
I have two problems:
My goal is to have the gallery appear once the story has been finished. However, the option is being shown on the menu before I trigger the unlock option, so I think I must have made a mistake somewhere.
The second issue is that once I click on the gallery button, I get this error:
Code: Select all
While running game code:
ScriptError: could not find label 'Gallery'.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "C:\Users\Morgana\Documents\renpy-6.13.7\renpy\bootstrap.py", line 276, in bootstrap
File "C:\Users\Morgana\Documents\renpy-6.13.7\renpy\main.py", line 354, in main
File "C:\Users\Morgana\Documents\renpy-6.13.7\renpy\main.py", line 95, in run
File "C:\Users\Morgana\Documents\renpy-6.13.7\renpy\execution.py", line 275, in run
File "C:\Users\Morgana\Documents\renpy-6.13.7\renpy\script.py", line 485, in lookup
ScriptError: could not find label 'Gallery'.
Here's what I have as far as programming related to these issues:
Code: Select all
#Gallery
label gallery:
python hide:
g = Gallery()
g.transition = dissolve
g.background = "#000000"
g.grid_layout((3, 4), (10, 12), (160, 124))
g.button("thumb_regret.png")
g.display("regret.png")
g.show()
return
Code: Select all
# Main Menu imagemap
init -2 python:
layout.imagemap_main_menu(
"titlemenubuttonsground.png",
"titlemenubuttonshover.png",
[ (90, 150, 310, 205, "Start Game"),
(90, 220, 315, 270, "Load Game"),
(90, 290, 285, 340, "Preferences"),
(90, 360, 225, 405, "Quit") ],
variant = 'locked'
)
layout.imagemap_main_menu(
"titlemenubuttonsgroundunlocked.png",
"titlemenubuttonshoverunlocked.png" ,
[
(90, 150, 310, 205, "Start Game"),
(90, 220, 315, 270, "Load Game"),
(90, 290, 285, 340, "Preferences"),
(90, 80, 250, 130, "Gallery"),
(90, 360, 225, 405, "Quit"),
],
variant = 'unlocked'
)
label main_menu:
if persistent.extra_unlocked:
$ _main_menu_variant = 'unlocked'
else:
$ _main_menu_variant = 'locked'
jump main_menu_screen
Code: Select all
$ renpy.pause(2.0)
$ persistent.extra_unlocked = 'unlocked'
return
Help?
Thank you!