So I have tried making my first game with Ren'Py, and thankfully I'm nearly finished with it! But I decided to add something into my game, and I've been unable to find similar posts on the subject.
I'm very new with Ren'Py, so it might just be an obvious issue I'm having.
My idea was to add another option to my main menu upon completing the game for the first time. I want an endings screen 'imagemap' where the endings change color upon being played.
I've added the option to my menu, and used persistent data to unlock it post game.
I have a working imagemap in my game already, and I assumed it was possible to use the same principle to achieve what I want. But it's not really working out as intended...
First issue:
I have my idle, hover and locked images ready.
I created a new Ren'Py document for the Endings Screen (I've pasted some of the code below)
But even if I set the ending to 'True', it just wont change color to the 'unlocked' color. I can't figure out why, and I feel like I've tried everything.
I also tried defining the endings in the script, making the hotspots clickable and a lot of other things, but with no luck.
Second issue:
I made a 'Return' button that I assumed would allow you to return to the main menu when you clicked that hotspot, but that doesn't seem to be working out either. I've tried hiding the screen, jumping to main menu etc. with no luck. I managed to get the best result with using 'clicked Return', but when clicked while displayed from the menu, it starts a new game.
I don't know it it's because you can't add an imagemap this way to the main menu?
Code: Select all
screen ending():
imagemap:
ground "endinglock.png"
hover "endinghover.png"
idle "endingunlock.png"
hotspot (460, 543, 139, 51) clicked Return
if persistent.atalossforwords:
hotspot (413, 19, 226, 50)
if persistent.nohope:
hotspot (23, 180, 119, 54)
if persistent.watchingoveryoualways:
hotspot (727, 532, 302, 43)
init python:
persistent.atalossforwords = False
persistent.nohope = False
persistent.watchingoveryoualways = False
Code: Select all
if persistent.gameclear == True:
textbutton _ ("Endings") action ShowMenu("ending")Code: Select all
$ persistent.watchingoveryoualways = TrueThanks for the help in advance!"
