Can I store a name or text somehow?

I'm making a mechanic where the player can die than find the pervious character's body and I thought it would be really cool if it would say something like here lies whatever the player named their pervious character. I have no idea if this would be possible because how I have it now is the player names the character whatever they want then gets to make a new name once they die and have a new character. Is there any way to store the pervious character's name somehow?
Before you change the name, store the actor's name in a variable.
Code:
◆Control Variables:#0001 First Value = $gameActors.actor(1).name();
Then just use \v[1] (or whichever variable number you used to store the name) to retrieve it
Code:
◆Text:None, Window, Bottom
:    :Here lies the body of \v[1].

To store text in a variable, choose the Script option

1655694735068.png


It would look like this in the event page

1655694665867.png
Before you change the name, store the actor's name in a variable.
Code:
◆Control Variables:#0001 First Value = $gameActors.actor(1).name();
Then just use \v[1] (or whichever variable number you used to store the name) to retrieve it
Code:
◆Text:None, Window, Bottom
:    :Here lies the body of \v[1].
Awesome! I don't use actual code to often but i figured it could be stored in variable somehow. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/can-i-store-a-name-or-text-somehow.148711/