- Apr 3, 2022
- 5
- 1
Hello!
I am trying to get Renpy to recognize input that was previously input earlier in the game.
What I mean is: At the beginning of the game, the game asks for the player's name. For the purposes of the explanation, I'll use the default name of Ben. This is saved under the variable mc (and using [mc] works just fine throughout the game.) Later on in the game, Ben is rather unexpectedly elevated to a position of Nobility and given a servant. The player can change what the servant calls him, and I want there to be a unique line of dialogue if the player chooses to put in their name, but when I've tested it, the code keeps using the default response rather than the unique one.
The code I wrote was simple]:
All of the other unique dialogues work, (Master, Daddy, the usual suspects), but I'm guessing the reason this one doesn't is because it is a name saved behind a variable, but I can't seem to figure out how to get Ren'Py to recognize that Ben is the same as the Ben stored in [mc].
I hope that makes sense, I feel like that was a bit of a convoluted way to explain it, but hopefully it's clear enough. If Ben is stored as [mc] then if the player inputs Ben again for what he wishes his servant to call him, I want there to be unique dialogue, but as things stand, typing Ben into this would result in the default dialogue.
Thanks for your help, I appreciate it!
I am trying to get Renpy to recognize input that was previously input earlier in the game.
What I mean is: At the beginning of the game, the game asks for the player's name. For the purposes of the explanation, I'll use the default name of Ben. This is saved under the variable mc (and using [mc] works just fine throughout the game.) Later on in the game, Ben is rather unexpectedly elevated to a position of Nobility and given a servant. The player can change what the servant calls him, and I want there to be a unique line of dialogue if the player chooses to put in their name, but when I've tested it, the code keeps using the default response rather than the unique one.
The code I wrote was simple]:
Code:
elif lord == "[mc]":
scene 100 with dis
a "*gasp* I- I could never be so presumptuous as to call you by your name, My L-"
I hope that makes sense, I feel like that was a bit of a convoluted way to explain it, but hopefully it's clear enough. If Ben is stored as [mc] then if the player inputs Ben again for what he wishes his servant to call him, I want there to be unique dialogue, but as things stand, typing Ben into this would result in the default dialogue.
Thanks for your help, I appreciate it!