why does Return() go back to the main menu?

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.
Post Reply
Message
Author
User avatar
AlfieMachica123
Regular
Posts: 56
Joined: Sun Jun 30, 2013 10:15 pm
Contact:

why does Return() go back to the main menu?

#1 Post by AlfieMachica123 » Tue Jul 09, 2013 1:10 am

here's my code , its simple , the problem is , when i access the screen from the game , and when i click return, it goes back to the main menu instead of going back to the story,

screen meddle2:
tag menu
use navigation

the navigation code is this ,

screen navigation:


# The various buttons.
imagemap:
ground "images/navigation_ground.png"
idle "images/navigation_idle.png"
hover "images/navigation_hover.png"
selected_idle "images/navigation_s_idle.png"
selected_hover "images/navigation_s_hover.png"

alpha False

hotspot (102, 709, 118, 26) action Return()
hotspot (259, 709, 79, 26) action ShowMenu("save")
hotspot (376, 709, 83, 26) action ShowMenu("load")
hotspot (493, 709, 96, 26) action ShowMenu("preferences")
hotspot (628, 709, 175, 26) action MainMenu()
hotspot (841, 709, 80, 26) action Quit()

thanks for anyone who would attend to my simple problem :)

User avatar
netravelr
Miko-Class Veteran
Posts: 504
Joined: Thu Jan 28, 2010 2:31 am
Completed: Culina: Hands in the Kitchen, Culina: The Spirit of Cooking, Saving Zoey
Projects: Love at the Laundromat
Organization: Lakeview Interactive
Deviantart: netravelr
Location: USA
Contact:

Re: why does Return() go back to the main menu?

#2 Post by netravelr » Tue Jul 09, 2013 1:31 am

If you do call screen it will work fine, my guess is you are saying show screen.

If you call return with no context, it will go to the main menu.
Image
Technical Designer/Programmer
Game Design Portfolio - Project updates on my Twitter
Experienced in: C/C++/C#, Python, Unreal, Unity, and Flash
_________________
"Space can be very lonely. The greatest adventure is having someone share it with you."

User avatar
AlfieMachica123
Regular
Posts: 56
Joined: Sun Jun 30, 2013 10:15 pm
Contact:

Re: why does Return() go back to the main menu?

#3 Post by AlfieMachica123 » Tue Jul 09, 2013 1:47 am

sorry, i just got it solved, i forgot to notice that there is a return statement just after the call_screen, so that's why it comes back to the main menu , well thank you :)

Post Reply

Who is online

Users browsing this forum: No registered users