I been looking and researching what more I can about this, but can not find a clear answer ...
What I seek to make is that I have that button in the main menu heading to the gallery is locked until the game is over.
I gallery ready to use, just need to know how to do to keep hidden the button of the gallery until the game is over.
Please help me...
Condition to unlock the gallery at the end of the game.
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.
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.
-
- Newbie
- Posts: 24
- Joined: Fri Aug 14, 2015 4:09 pm
- Contact:
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Condition to unlock the gallery at the end of the game.
How are you showing the gallery now? You can make this conditional using code like:
(This assumes you use Start("gallery") to show the gallery. Your code might use ShowMenu("gallery") or something else entirely.)
To actually do the unlock, use code like:
Code: Select all
textbutton "Gallery" action If(persistent.unlock_gallery, Start("gallery"))
To actually do the unlock, use code like:
Code: Select all
$ persistent.unlock_gallery = True
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Newbie
- Posts: 24
- Joined: Fri Aug 14, 2015 4:09 pm
- Contact:
Re: Condition to unlock the gallery at the end of the game.
My code for botton overlooking the gallery I got this:
When you try to attach the code as you gave me gave me an error ....
Code: Select all
imagebutton idle "gui/arrow_idle.png" hover "gui/arrow_right_hover.png" xpos 500 ypos 400 focus_mask True action ShowMenu('hilo')
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/screens.rpy", line 196: u'if' is not a keyword argument or valid child for the imagebutton statement.
imagebutton idle "gui/arrow_idle.png" hover "gui/arrow_right_hover.png" xpos 500 ypos 400 focus_mask True action if (persistent.unlock_gallery, ShowMenu('hilo'))
^
Ren'Py Version: Ren'Py 6.99.5.602
Who is online
Users browsing this forum: Google [Bot]