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.
-
amaturemanga
- Regular
- Posts: 94
- Joined: Sun Mar 08, 2015 6:55 pm
- Deviantart: amaturemanga
- Skype: amature.manga
-
Contact:
#1
Post
by amaturemanga » Wed Aug 15, 2018 1:20 pm
Hello im trying to modify my main menu so that the option on the main menu to go to the Gallery screen is not visible as an option on the main menu until the player completes a route. I managed to do that sort of by going to my script creating the variable completedRoutes and setting it to 0
then i went to my navigation screen and added this if statement
Code: Select all
if completedRoutes > 0:
textbutton _("Gallery") action NullAction()
you'll notice for now i set it to NullAction as right now i wanted to just make it so it appears only when completed routes is greater then 0. In my script i added this code so that completedRoutes = 1
Code: Select all
scene black
e "Hello World!"
$ completedRoutes += 1
return
But when it returns to the main menu Gallery is still not visible. Not sure what im doing wrong. Thanks in advance.
Last edited by
amaturemanga on Wed Aug 15, 2018 3:40 pm, edited 1 time in total.
-
Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
-
Contact:
#2
Post
by Per K Grok » Wed Aug 15, 2018 2:30 pm
amaturemanga wrote: ↑Wed Aug 15, 2018 1:20 pm
...
But when it returns to the main menu Gallery is still not visible. Not sure what im doing wrong. Thanks in advance.
When you step back to the main menu you step out of the game you was playing and values saved during that play is no longer available to you. So competedRoutes is now at its original value (0)
You could possibly use persistent data.
-
amaturemanga
- Regular
- Posts: 94
- Joined: Sun Mar 08, 2015 6:55 pm
- Deviantart: amaturemanga
- Skype: amature.manga
-
Contact:
#3
Post
by amaturemanga » Wed Aug 15, 2018 3:02 pm
Per K Grok wrote: ↑Wed Aug 15, 2018 2:30 pm
amaturemanga wrote: ↑Wed Aug 15, 2018 1:20 pm
...
But when it returns to the main menu Gallery is still not visible. Not sure what im doing wrong. Thanks in advance.
When you step back to the main menu you step out of the game you was playing and values saved during that play is no longer available to you. So competedRoutes is now at its original value (0)
You could possibly use persistent data.
how would i set up persistent data
-
amaturemanga
- Regular
- Posts: 94
- Joined: Sun Mar 08, 2015 6:55 pm
- Deviantart: amaturemanga
- Skype: amature.manga
-
Contact:
#4
Post
by amaturemanga » Wed Aug 15, 2018 3:39 pm
Never mind i got it
Users browsing this forum: Bing [Bot]