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.
-
chesarty
- Regular
- Posts: 116
- Joined: Sat Aug 25, 2018 3:07 am
- Completed: 0
-
Contact:
#1
Post
by chesarty » Thu Oct 15, 2020 3:25 pm
I'm working on a custom main menu using imagebuttons and everything else is working as intended except for one thing. When I go from main menu to settings and then try to use the return button, it starts the game instead of going back to the main menu. This is odd since I didn't change anything about the game menu, only main menu.
Main menu code:
Code: Select all
screen main_menu():
imagemap:
ground "animated mainmenu"
idle "gui/mainmenuidle.png"
hover "gui/mainmenuhover.png"
hotspot (0, 454, 525, 110) action Start():
hover_sound "audio/hoversound.mp3"
activate_sound "audio/choicesound.mp3"
hotspot (0, 575, 525, 110) action ShowMenu("load"):
hover_sound "audio/hoversound.mp3"
activate_sound "audio/choicesound.mp3"
hotspot (0, 691, 525, 110) action ShowMenu("preferences"):
hover_sound "audio/hoversound.mp3"
activate_sound "audio/choicesound.mp3"
hotspot (0, 815, 525, 110) action ShowMenu("help"):
hover_sound "audio/hoversound.mp3"
activate_sound "audio/choicesound.mp3"
hotspot (0, 938, 525, 110) action Quit(confirm=not main_menu):
hover_sound "audio/hoversound.mp3"
activate_sound "audio/choicesound.mp3"
Game menu return label code:
Code: Select all
textbutton _("Return"):
style "return_button"
action Return("main_menu")
Any help? :0
Last edited by
chesarty on Sat Oct 17, 2020 7:12 am, edited 1 time in total.
-
Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
-
Contact:
#2
Post
by Imperf3kt » Thu Oct 15, 2020 5:02 pm
You need to add tag menu to the screen.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project:
GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
-
chesarty
- Regular
- Posts: 116
- Joined: Sat Aug 25, 2018 3:07 am
- Completed: 0
-
Contact:
#3
Post
by chesarty » Fri Oct 16, 2020 1:00 am
Imperf3kt wrote: ↑Thu Oct 15, 2020 5:02 pm
You need to add tag menu to the screen.
Thanks. Added it, but it still doesn't go back to the main menu.
-
nananame
- Regular
- Posts: 72
- Joined: Fri Oct 13, 2017 1:40 pm
-
Contact:
#4
Post
by nananame » Fri Oct 16, 2020 1:52 am
The return code for the game menu should not pass anything:
Code: Select all
textbutton _("Return"):
style "return_button"
action Return()##delete the "main_menu"
Users browsing this forum: Google [Bot], TioNick