conditional substitution for "what"
Posted: Mon May 31, 2021 11:05 am
Hi, i need check conditional statement before each say or menu choice 'what'. Would you help me to create function or maybe oneline substution for this:
something like that:
or like that
or substitution:
if i add in def parse in "renpy/substiturion.py"
its work, but i cannot transfer persistent variable from game code to renpy main code for select, i get 'not defined variable', maybe you help me to do this
Code: Select all
if persistent.c=="1":
$ a = tuple1
if persistent.c=="2":
$ a = tuple2
"[a[0]]"Code: Select all
"[tuple(c)[0]]"Code: Select all
"%s" % (str("\[tuple"+c+"\[0\]\]"))if i add in def parse in "renpy/substiturion.py"
Code: Select all
s = s.replace("tuple(c)", "tuple1")Code: Select all
if c == '1':
s = s.replace("tuple(c)", "tuple1")