Setting variable as another variable (solved)
Posted: Fri Jan 11, 2019 4:41 am
Hi there, I'm coding the point system at the moment to determine which character the player will end up with. Of course, there are also scenes for the possibility that you end up with a tie. The system works fine at the moment except for one tiny detail.
The game will fill in the right name for those tiedBoy variables used in the dialogue. But when I try to use the boyChoice variable...
This will just print out [boyChoice] instead of the name set to one of the tiedBoy variables.
I was wondering if it's possible at all to set a variable as another variable. But this could be a syntax error on my part after all! Thanks in advance
Code: Select all
if tiedBetweenTwo == True:
show choiceOverlay
menu:
"[tiedBoy1]":
hide choiceOverlay
$ boyChoice = "[tiedBoy1]"
$ renpy.fix_rollback()
MC "[tiedBoy1]?"
MC "Of course!"
"[tiedBoy2]":
hide choiceOverlay
$ boyChoice = "[tiedBoy2]"
$ renpy.fix_rollback()
MC "[tiedBoy2]?"
MC "Of course!"Code: Select all
MC "[boyChoice], you will be mine!"I was wondering if it's possible at all to set a variable as another variable. But this could be a syntax error on my part after all! Thanks in advance