Is it possible to put a menu after an extend, or a similar effect?

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
Jaitzche
Newbie
Posts: 13
Joined: Sun Jan 07, 2018 1:26 am
Contact:

Is it possible to put a menu after an extend, or a similar effect?

#1 Post by Jaitzche »

So, my game is heavily text-based. At a couple parts, I'd like to try to make it where the choices show up at the same time as the text, but it throws errors if I try to mix the menu: with an extend, either before or after. I know it can be done with a regular block of text, but like I said I'm trying to go for a certain effect.

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

Re: Is it possible to put a menu after an extend, or a similar effect?

#2 Post by Alex »

So, what's the actual code that cause an error? Could you be more specific on how this extend should work (what text you want to extend, what player should do to make it occurs, etc.)?

Jaitzche
Newbie
Posts: 13
Joined: Sun Jan 07, 2018 1:26 am
Contact:

Re: Is it possible to put a menu after an extend, or a similar effect?

#3 Post by Jaitzche »

Alex wrote: Sun Mar 24, 2019 9:42 am So, what's the actual code that cause an error? Could you be more specific on how this extend should work (what text you want to extend, what player should do to make it occurs, etc.)?
Pretty much it would be something like this-

Code: Select all

"Some words here."
extend "Some more words here."
extend "And even more words here."
	menu: 
		choice 1:
		choice 2:
Just to get the gist of what I'm trying to do- to make the menu/choices show up once that last extend happens. Though doing it this way it complains about indentations. Correctly indenting makes it work except the choices show up on their own screen (without the previous text, which isn't what I want).

Another way I tried it is-

Code: Select all

menu:
	"Some words here."
	extend "Some more words here."
	extend "and even more words here"
	choice 1:
	choice 2:
	
But this throws an error saying menu items and caption can't exist in the same menu.

Again, my main goal is for the text to still be showing when the choices show up.

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

Re: Is it possible to put a menu after an extend, or a similar effect?

#4 Post by Alex »

You can have one caption in a menu, so if you need several text extensions all of them exept last one must be out of menu. Try

Code: Select all

label start:
    e "..."
    menu:
        extend " ... ..."
        "Choice":
            pass
https://www.renpy.org/doc/html/menus.html

Jaitzche
Newbie
Posts: 13
Joined: Sun Jan 07, 2018 1:26 am
Contact:

Re: Is it possible to put a menu after an extend, or a similar effect?

#5 Post by Jaitzche »

Alex wrote: Sun Mar 24, 2019 6:40 pm You can have one caption in a menu, so if you need several text extensions all of them exept last one must be out of menu. Try

Code: Select all

label start:
    e "..."
    menu:
        extend " ... ..."
        "Choice":
            pass
https://www.renpy.org/doc/html/menus.html
That works perfectly! Thank you so much!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]