I'm trying to have a character say randomly chosen lines of dialogue while the player is naming themselves, but run into 2 issues.
1) I can't have a menu show dialogue and a choice if I have something else besides dialogue in the menu like this:
Code: Select all
label start:
e "You've created a new Ren'Py game."
$ vartest = 1
if vartest == 1:
e "vartest is 1"
label question:
menu:
if vartest == 1:
e "Is this text is displayed while the menu choices are visible?"
elif vartest == 2:
e "this is alternative text that can be chosen to be displayed during the menu"
#e "this is the normal position to show dialogue while menu choices are visible."
"Yes":
e "Okay."
jump Continue
"No":
e "Oh? what went wrong?"
jump question
label Continue:
e "the game continues after"
2) I am having trouble showing variables properly from renpy.random.choice([]) when they are inside the choices ...uhh like this:
Code: Select all
$ name = "john"
$ randomtalk = renpy.random.choice(["Are you [name] then?", "You're [name]?"])
e "[randomtalk]"
Ideally I wanted to combine the both to generate random dialogue while the menu is showing (and also have a lot more dynamic dialogue during the rest of the game) but I don't know if I am going about these the correct way, if there is a simpler way to do these, or if it just isn't possible without doing something too complicated for a beginner.