After creating menus how do I "rejoin" the choices?

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.
Message
Author
User avatar
inohatake14
Regular
Posts: 73
Joined: Sun Jul 24, 2011 4:35 pm
Projects: Stained with Magic
Location: TX
Contact:

After creating menus how do I "rejoin" the choices?

#1 Post by inohatake14 »

^I'm not quite sure that makes any sense but basically I just want to know how to be able to stop typing in the "if" and "else" statements and rejoin the story until the next menu. I'm pretty sure you can do that right? Thanks in advance, and I'm sorry if I shouldn't have posted this. However I searched all the forum topics as well as several FAQs and and re watched the tutorial dozens of times. I just can't find out how to do this- though I probably haven't been using the right keywords because I can't possibly be the only one to ask this-that is unless I'm more of an idiot than I previously thought. o.o

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: After creating menus how do I "rejoin" the choices?

#2 Post by PyTom »

You just need to outdent.

Code: Select all

    if points >= 7:
         "Congratulations, you are the sort of discerning gentleman that has 7 or more points."
    else:
         "Be gone, cad. You have six or less points."

    "Either way, you will see this line."
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
inohatake14
Regular
Posts: 73
Joined: Sun Jul 24, 2011 4:35 pm
Projects: Stained with Magic
Location: TX
Contact:

Re: After creating menus how do I "rejoin" the choices?

#3 Post by inohatake14 »

REALLY??? xD So simple I missed it! Thanks, I'm pretty sure I never would have thought of that, and sorry to waste a topic like that. o.o
-Needs to buy a tablet :( - Also if you specialize in backgrounds and take requests and/or want to partner up on a project, hit me up! ;)

Image

Image

User avatar
inohatake14
Regular
Posts: 73
Joined: Sun Jul 24, 2011 4:35 pm
Projects: Stained with Magic
Location: TX
Contact:

Re: After creating menus how do I "rejoin" the choices?

#4 Post by inohatake14 »

What if you want to put a menu in a choice, say the one you label false- but you don't want it for the other choice?
-Needs to buy a tablet :( - Also if you specialize in backgrounds and take requests and/or want to partner up on a project, hit me up! ;)

Image

Image

0ion9
Regular
Posts: 79
Joined: Thu Jun 16, 2011 9:17 am
Contact:

Re: After creating menus how do I "rejoin" the choices?

#5 Post by 0ion9 »

.. then you put it in there. It's not like it's any different from anywhere else.

User avatar
inohatake14
Regular
Posts: 73
Joined: Sun Jul 24, 2011 4:35 pm
Projects: Stained with Magic
Location: TX
Contact:

Re: After creating menus how do I "rejoin" the choices?

#6 Post by inohatake14 »

>.< I don't get it though all the indentation and stuff. I know how to do a menu, but putting another one inside of it.... Well I know I seem stupid to everyone here. >.<
-Needs to buy a tablet :( - Also if you specialize in backgrounds and take requests and/or want to partner up on a project, hit me up! ;)

Image

Image

User avatar
Camille
Eileen-Class Veteran
Posts: 1227
Joined: Sat Apr 23, 2011 2:43 pm
Completed: Please see http://trash.moe
Projects: the head well lost
Organization: L3
Tumblr: narihira
Deviantart: crownwaltz
itch: lore
Contact:

Re: After creating menus how do I "rejoin" the choices?

#7 Post by Camille »

More about indentation: http://renpy.org/doc/html/language_basi ... and-blocks

An indent in Ren'Py is 4 spaces. Generally when you have something with a colon, whatever follows it has to be four spaces over like:

Code: Select all

label start:
    menu:
        "Option here":
            menu:
                "Another option here":
                    "Text!"
        "Second option here":
            "Text!"
            "More text!"
See how you add four spaces each time as you get "deeper" into the code?

User avatar
inohatake14
Regular
Posts: 73
Joined: Sun Jul 24, 2011 4:35 pm
Projects: Stained with Magic
Location: TX
Contact:

Re: After creating menus how do I "rejoin" the choices?

#8 Post by inohatake14 »

See i thought it was like that... but eventually if you keep adding menu inside of menu won't you run out of room? Well I guess not. xD Thanks. :D
-Needs to buy a tablet :( - Also if you specialize in backgrounds and take requests and/or want to partner up on a project, hit me up! ;)

Image

Image

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: After creating menus how do I "rejoin" the choices?

#9 Post by PyTom »

inohatake14 wrote:See i thought it was like that... but eventually if you keep adding menu inside of menu won't you run out of room? Well I guess not. xD Thanks. :D
While Ren'Py will take arbitrary indentation, after a while it becomes hard to write the game. You can use a jump to go somewhere else in the script, when necessary.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
inohatake14
Regular
Posts: 73
Joined: Sun Jul 24, 2011 4:35 pm
Projects: Stained with Magic
Location: TX
Contact:

Re: After creating menus how do I "rejoin" the choices?

#10 Post by inohatake14 »

Umm... How exactly do i use a jump? I mean I know you can type in jump like you do images and stuff, but I thought that was for the program to read things smoother... Or is there a different jump I can use then, or can I actually use that somehow? I bet it is like jumping when reading a video game FAQ isn't it? I never really learned how to do that... maybe I'll just waste away my days scrolling until my hands turn to dust... >.<
-Needs to buy a tablet :( - Also if you specialize in backgrounds and take requests and/or want to partner up on a project, hit me up! ;)

Image

Image

bink
Regular
Posts: 49
Joined: Sat Jul 09, 2011 4:34 pm
Contact:

Re: After creating menus how do I "rejoin" the choices?

#11 Post by bink »

inohatake14 wrote:Umm... How exactly do i use a jump? I mean I know you can type in jump like you do images and stuff, but I thought that was for the program to read things smoother... Or is there a different jump I can use then, or can I actually use that somehow? I bet it is like jumping when reading a video game FAQ isn't it? I never really learned how to do that... maybe I'll just waste away my days scrolling until my hands turn to dust... >.<
You can define labels (points in your story) and then jump to them.
I do this whenever the scene changes somehow or if there's a story branch after a menu, but they can be placed anywhere.
It works like this:

Code: Select all

label start:
    "This is how it all begins."
    menu:
        "Which path do you choose?"
        "Right":
            jump choice_right
        "Wrong":
            jump choice_wrong

label choice_right:
    "You chose right!"
    jump end
    
label choice_wrong:
    "You chose wrong!"
    jump end
    
label end:
    "So this is how it ends, I guess."
The end result is always the same in the example, but I guess you understand how this can be used to get different endings whilst avoiding endless blocks of menu, menu, menu, etc.

User avatar
inohatake14
Regular
Posts: 73
Joined: Sun Jul 24, 2011 4:35 pm
Projects: Stained with Magic
Location: TX
Contact:

Re: After creating menus how do I "rejoin" the choices?

#12 Post by inohatake14 »

i think I have been doing that when I learned how to do menus in the first place o.o... but I still scroll everywhere- ah I'm just confusing myself! @.@ Thanks though.
-Needs to buy a tablet :( - Also if you specialize in backgrounds and take requests and/or want to partner up on a project, hit me up! ;)

Image

Image

User avatar
inohatake14
Regular
Posts: 73
Joined: Sun Jul 24, 2011 4:35 pm
Projects: Stained with Magic
Location: TX
Contact:

Re: After creating menus how do I "rejoin" the choices?

#13 Post by inohatake14 »

Umm... So I have spent the last couple of days trying to fix this but... Well basically what I'm TRYING to do in my story is branch off like this; (yeah this probably won't make much sense so I have attached the script, but this was the easiest way for me to explain it)

choice 1.
option a- follow Adam
option b- stay behind at one point option b is supposed to branch off like so;

if b choice 2
option a-introduce yourself
option b- search for Hiyaku

(so far I have put in anymore choices because the ones I have are not functioning properly.)

Now the PROBLEM I keep running across is that no matter what I choose for choice 1 I still go through option a of choice 2.
I've messed with the indenting countless times and I relabeled the second menu "flag menu_flag2" and etc to see if it would help... I have no idea what the problem is, unless I need to use more labels for my choices than true and false or something. I'm really stumped, please help! >.<

Also let me know if the stupid attachment didn't show :/
Attachments
thescript.rpy
I hope the attachment works >.<
(19.19 KiB) Downloaded 132 times
-Needs to buy a tablet :( - Also if you specialize in backgrounds and take requests and/or want to partner up on a project, hit me up! ;)

Image

Image

0ion9
Regular
Posts: 79
Joined: Thu Jun 16, 2011 9:17 am
Contact:

Re: After creating menus how do I "rejoin" the choices?

#14 Post by 0ion9 »

menu flag
'menu flag' is NOT a variable name -- variable names cannot contain spaces. Your script should crash on those lines where you attempt to assign to 'menu flag' or check it's value. Same goes for 'menu flag2'. You need to fix your variable names to be valid Python before you expect your script to do anything but crash horribly.
(I'm quite curious as to why they have not already crashed.)

User avatar
inohatake14
Regular
Posts: 73
Joined: Sun Jul 24, 2011 4:35 pm
Projects: Stained with Magic
Location: TX
Contact:

Re: After creating menus how do I "rejoin" the choices?

#15 Post by inohatake14 »

yeah I didn't notice the "menu flag" i thought i had them all set to "menu_flag" before i intentionally changed everything to menu_flag2 or menu flag2 or whatever i was just so outta options... Yeah i thought for sure it would crash too but it didn't xD Lemme go put it back, but it still wasn't working right before... I just don't know why! D:
-Needs to buy a tablet :( - Also if you specialize in backgrounds and take requests and/or want to partner up on a project, hit me up! ;)

Image

Image

Post Reply

Who is online

Users browsing this forum: No registered users