Ren'Py Change character name?

BimboTrainer

New Member
Nov 4, 2018
2
1
I'm a bit new and this is probably a silly question, but I can't get it to work.

I want the player to choose their own name and have it update the character-box.
So like in this image:

Screenshot (25).png

I'd prefer to have the ??? be named early, but every time I try it throws up error codes.

define p = Character('???', color="#c8ffc8")
How do I change this so that I can alter the '???' later? I've tried just about everything
(['player'], color="#c8ffc8")
([player], color="#c8ffc8")
(['[player], color="#c8ffc8")
I've looked up and copied the Name code, but that only creates a variable for within-dialogue, not changing the character box itself.
 

BimboTrainer

New Member
Nov 4, 2018
2
1
Thank you. I realized what the problem was.
It was a combination of that and declaring the variable above the declaration, when I used that syntax and added $ player = "???" down after the start label it began working. I feel like a moron haha.
 
  • Like
Reactions: Papa Ernie