I've been working on a replay gallery that's basically a grid with image buttons for my characters that takes them to individual character screens with image buttons using this code.
That code points to my main game script at a label "introdorm" and it plays until it hits $ renpy.end_replay() which I put where I want my replay to end.
That all works great. The problem is the replay doesn't show the player's name it shows it as [playername] and if there is any variables like if I assign points and there is a check for points in the replay it just errors out as undefined.
The code I'm using to define the character's name is
Then during gameplay
That works in the game but not in replays. Does anyone know how to do this? My thoughts are probably having to create another rpy file that is just copy/paste the scenes for replay and manually assign max points. But I don't know how to do the code so it will prompt for a name once then save it so any subsequent visits to replay it won't ask for the players name again. I'm still a novice at programming.
Code:
if renpy.seen_image ( "v1dorm05" ):
imagebutton idle "Gallery Images/c01.jpg" hover "Gallery Images/c01h.jpg" action Replay ( "introdorm" )
else:
imagebutton idle "Gallery Images/locked.jpg"
That all works great. The problem is the replay doesn't show the player's name it shows it as [playername] and if there is any variables like if I assign points and there is a check for points in the replay it just errors out as undefined.
The code I'm using to define the character's name is
Code:
define MC = Character("[playername]", color="#2A4B7C")
Code:
$ playername = renpy.input("\"What is your name?\" (default Matt)", length=15)
$ playername = playername.strip()
if playername == "":
$ playername = "Matt"
Last edited: