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.
-
apoto
- Newbie
- Posts: 22
- Joined: Thu Apr 26, 2018 11:32 am
-
Contact:
#1
Post
by apoto » Sat Jul 21, 2018 3:56 pm
I'm trying to show different buttons on different menu screens,but I can't make the codes work, please show me a way to fix it or replace it.
Code: Select all
screen evidence():
tag menu
predict False
use game_menu(_("Evidence"), scroll="viewport"):
style_prefix "evidence"
use navigation
this is one of the menu screens
Code: Select all
screen navigation():
if evidence:
image"evidence_main.png"
else:
imagebutton:# evidence
idle "gui/setting/evidence.png"
hover "gui/setting/evidence_hover.png"
xpos 869 ypos 17
action ShowMenu("evidence")
this is the navigation screen I was planning to make it show different buttons based on the menu screens.
-
xavimat
- Eileen-Class Veteran
- Posts: 1458
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love, unknown
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
-
Contact:
#2
Post
by xavimat » Sat Jul 21, 2018 6:19 pm
For example:
Code: Select all
screen navigation():
if renpy.get_screen("evidence"):
add "evidence_main.png"
else:
# ...
Note:
- The statement "image" is used to define images at init time, not inside screens.
- In your example of evidence screen, there is no content to pass to the game_menu screen.
- The line "use navigation" has wrong indentation and shouldn't been included in evidence screen, because it's already present in game_menu screen
-
apoto
- Newbie
- Posts: 22
- Joined: Thu Apr 26, 2018 11:32 am
-
Contact:
#3
Post
by apoto » Sat Jul 21, 2018 9:28 pm
xavimat wrote: ↑Sat Jul 21, 2018 6:19 pm
For example:
Code: Select all
screen navigation():
if renpy.get_screen("evidence"):
add "evidence_main.png"
else:
# ...
Note:
- The statement "image" is used to define images at init time, not inside screens.
- In your example of evidence screen, there is no content to pass to the game_menu screen.
- The line "use navigation" has wrong indentation and shouldn't been included in evidence screen, because it's already present in game_menu screen
Thank you! It's a great help to me!
Users browsing this forum: No registered users