Prevent the story to go on after I click a "Close" button

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
Jezzy
Regular
Posts: 30
Joined: Wed Jun 21, 2017 2:18 pm
Contact:

Prevent the story to go on after I click a "Close" button

#1 Post by Jezzy »

Greetings!

I am working on a Renpy project and so far its very promising however I have a probably very basic bug that I cannot figure how to fix.

I have a few screens (user interfaces) that I show the player when they click on an icon on the screen (inventory screen, character screen, map, etc.). Everything work perfectly until you click on the close button to exit the interface. It works and close the screen but it also carry on with the main game story, just like when you click anywhere during the normal story mode, you go to the next topic or label etc.

Is there a way to prevent the story to carry on after I have clicked on my "close button" ?

Here a very basic code of one of my window :

Code: Select all

screen cs_screen:
    add "gui/inventory.png" # the background
    modal True #prevent clicking on other stuff when shown
    hbox align (.517,.92) spacing 20:
        textbutton "Close" action [ Hide("cs_screen"), Show("cs_button"), Return(None)]

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Prevent the story to go on after I click a "Close" butto

#2 Post by Alex »

Just remove Return(None) from the list of actions.

Jezzy
Regular
Posts: 30
Joined: Wed Jun 21, 2017 2:18 pm
Contact:

Re: Prevent the story to go on after I click a "Close" butto

#3 Post by Jezzy »

Alex wrote:Just remove Return(None) from the list of actions.
:P omg! I feel dumb now :D thank you very much

Post Reply

Who is online

Users browsing this forum: No registered users