Choices in Renpy(Returning to a previous point)

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
Wendyd24
Newbie
Posts: 2
Joined: Wed Nov 15, 2017 11:04 pm
Contact:

Choices in Renpy(Returning to a previous point)

#1 Post by Wendyd24 » Sun Nov 19, 2017 1:39 pm

Hello! I'm sorry the title isn't very descriptive because I'm unsure of what I'm really needing to do here.

To be more specific, I'm trying to give the player an option on what they'd like to do first. This choice does not affect the game, but I feel I'd like to give them options here and there, other than the major ones, so that they feel they are playing a very interactive visual novel. (Not that they aren't, I just don't want them to run into huge walls of reading with no choices before a major choice.)

For example, I want them to decide who they'd like to talk to first. There are three girls the player may choose from. He can choose girl A first, but he will eventually be sent back to a screen where he can choose girl B or girl C. When they return, I would like the choice for girl A to be gone.

I am not sure how to script that. I've tried searching everywhere, but I am having trouble finding a way that works. I first tried making a menu system, but then I read that a label would be better. I read about branching, calling, jumping, and I just cannot seem to find a way to use what I've read to help myself. If you guys could even point me in the right direction I would greatly appreciate it. (:

This is my first time posting, so let me know how to improve my post so I can help you help me.

User avatar
mitoky
Regular
Posts: 156
Joined: Sat Feb 07, 2015 9:12 pm
Projects: CrossDol, The Purring Demon's Love
Deviantart: mitoky
Contact:

Re: Choices in Renpy(Returning to a previous point)

#2 Post by mitoky » Sun Nov 19, 2017 1:58 pm

I think you mean something like this?

before the start label :

Code: Select all

default girl_a = False
default girl_b = False
default girl_c = False
and then in game:

Code: Select all

label menu_girl_choices:

    menu:
        "Girl A" if not girl_a:
            jump girl_a_choice
        "Girl B" if not girl_b:
            jump girl_b_choice
        "Girl C" if not girl_c:
            jump girl_c_choice
        "All done!" if girl_a and girl_b and girl_c:
            jump continue_main_story

label girl_a_choice:
    $ girl_a = True
    "Here you have the conversation!"
    jump menu_girl_choices

label girl_b_choice:
    $ girl_b = True
    "Here you have the conversation!"
    jump menu_girl_choices

label girl_c_choice:
    $ girl_c = True
    "Here you have the conversation!"
    jump menu_girl_choices

label continue_main_story:
    "Here the game goes on!"
EDIT: Whoops, re-read, do you mean that you can only choose girl A at first? If so, then like this:

before the start label :

Code: Select all

default girl_a = False
default girl_b = False
default girl_c = False
and then in game:

Code: Select all

label menu_girl_choices:

    menu:
        "Girl A" if not girl_a:
            jump girl_a_choice
        "Girl B" if girl_a and not girl_b:
            jump girl_b_choice
        "Girl C" if girl_a and not girl_c:
            jump girl_c_choice
        "All done!" if girl_a and girl_b and girl_c:
            jump continue_main_story

label girl_a_choice:
    $ girl_a = True
    "Here you have the conversation!"
    jump menu_girl_choices

label girl_b_choice:
    $ girl_b = True
    "Here you have the conversation!"
    jump menu_girl_choices

label girl_c_choice:
    $ girl_c = True
    "Here you have the conversation!"
    jump menu_girl_choices

label continue_main_story:
    "Here the game goes on!"
Additionally, if you dont want to jump back to the menu once all girls have been chosen, simply scratch the "All done!" choice from the menu completly. Afterwards, instead of "jump menu_girl_choices" in the girl labels (girl_a_choice, girl_b_choice, girl_c_choice) add this:

Code: Select all

if girl_a and girl_b and girl_c:
    jump continue_main_story
else:
    jump menu_girl_choices
Last edited by mitoky on Sun Nov 19, 2017 2:19 pm, edited 2 times in total.

Wendyd24
Newbie
Posts: 2
Joined: Wed Nov 15, 2017 11:04 pm
Contact:

Re: Choices in Renpy(Returning to a previous point)

#3 Post by Wendyd24 » Sun Nov 19, 2017 2:15 pm

You had it right the first time, sorry for the confusion. What I meant was, if he picked girl A the first time, I didn't want him to see that choice again. You are a life saver, this is exactly what I was trying to do. Thank you so much. (:

User avatar
mitoky
Regular
Posts: 156
Joined: Sat Feb 07, 2015 9:12 pm
Projects: CrossDol, The Purring Demon's Love
Deviantart: mitoky
Contact:

Re: Choices in Renpy(Returning to a previous point)

#4 Post by mitoky » Sun Nov 19, 2017 2:20 pm

No problem! ^^ i added a small addition to my first post, in case you dont want to jump back to the menu once all girl have been chosen!

Post Reply

Who is online

Users browsing this forum: Google [Bot], troye_idk_idk