Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
I've set up a simple "gloassary" in my game since I couldn't find anything that worked for what I wanted since it isn't going to be very large.
Anyway I want to lock buttons so they cannot be opened before a certain time in game. Preferably so it's open if and when they decide to go and do another pass through.
I thought I could use a simple True/False persistent but I'm not really sure how to go about doing this and since I can't do the search on these forums I limited to google which has been 0% helpful in figuring this out.
I'm an idiot, it seems to work now that I've changed it from persistent.notes_example to persistent.notes_example_unlock and then just do an =True in script where needed. OTL
Last edited by XxrenxX on Sat Nov 09, 2019 10:38 pm, edited 2 times in total.
XxrenxX wrote: ↑Fri Nov 08, 2019 5:50 pm
I've set up a simple "gloassary" in my game since I couldn't find anything that worked for what I wanted since it isn't going to be very large.
Anyway I want to lock buttons so they cannot be opened before a certain time in game. Preferably so it's open if and when they decide to go and do another pass through.
I thought I could use a simple True/False persistent but I'm not really sure how to go about doing this and since I can't do the search on these forums I limited to google which has been 0% helpful in figuring this out.
Im not really good at imagemaps, so you can try this if it is works.
vbox:
button:
imagemap:
if persistent.unlock:
ground "GUI/Phone/Note_Frame.png"
hover "GUI/Phone/Note_Frame_H.png"
hotspot (0, 0, 365, 55) action ShowMenu("notes_example")
text "Entry 01" style "notes_button"
else:
(Anything but a locked button with a text or etc.)
I am a friendly user, please respect and have a good day.
vbox:
button:
imagemap:
if persistent.unlock:
ground "GUI/Phone/Note_Frame.png"
hover "GUI/Phone/Note_Frame_H.png"
hotspot (0, 0, 365, 55) action ShowMenu("notes_example")
text "Entry 01" style "notes_button"
else:
(Anything but a locked button with a text or etc.)
I have tried a few things since posting and where persistent does work, it doesn't keep the item globally unlocked. Even when loading a save file the item relocks itself. If using just persistent.unlock, how does the game know which one to unlock and when? I plan to use this for multiple entries not just the one.