The problem I'm having now seems like it should be simple, but I can't think of a way to do it. Most of my game is in nvl mode, with all dialogue spoken by a narrator rather than characters. More similar to interactive fiction than a visual novel, but I like ren'py and I know a little bit of python so I'm hoping to make it work.
I want to use conditional statements (if/elif/else) to change words within dialogue without skipping a line or requring click-to-continue so it's seamless.
I can use if statements to control which sentence is displayed, but most of my sentences are in full on paragraphs and I'd like to keep it cleaner if I can. Is there a way to use conditional statements in python within the dialogue without it skipping a line or requiring click-to-continue?
Something like the following:
Code: Select all
"Brushing your teeth, you contemplate your day tomorrow. The CEO had mentioned an important meeting "
if k_gender == "Man":
"he"
elif k_gender == "Woman":
"she"
else:
"they"
" wanted you to attend."
""Brushing your teeth, you contemplate your day tomorrow. The CEO had mentioned an important meeting she wanted you to attend."
However, this code will appear in the game as
"Brushing your teeth, you contemplate your day tomorrow. The CEO had mentioned an important meeting <click>
she <click>
wanted you to attend."
I know I can use if statements to choose which sentence to portray but then I'd have like 12 duplicates of the same paragraph for each choice option, and I like to keep it simple, if it's possible to do at all.
Any ideas? Thanks everyone!