After creating menus how do I "rejoin" the choices?
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.
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.
- 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?
^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
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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?
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(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- 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?
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
- 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?
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?
Re: After creating menus how do I "rejoin" the choices?
.. then you put it in there. It's not like it's any different from anywhere else.
- 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?
>.< 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. >.<
- 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?
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:
See how you add four spaces each time as you get "deeper" into the code?
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!"
- 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?
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.
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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?
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.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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- 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?
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... >.<
Re: After creating menus how do I "rejoin" the choices?
You can define labels (points in your story) and then jump to them.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... >.<
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."
- 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?
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.
- 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?
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 :/
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 136 times
Re: After creating menus how do I "rejoin" the choices?
'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.menu flag
(I'm quite curious as to why they have not already crashed.)
- 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?
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:
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot]