Set Actor's Name to X

My game happens to use the name input processing command. However, there doesn't seem to be any way to change/reset an actor's name (other than opening that window and having the player do it manually).

How can I add a command to the game's script to change an actor's name to something specific? For example, "Change Actor 6's name to Bert" or "Change Actor 10's name to " (blank)
You can use a script call: $gameActors.actor(actorId).setName(n)
My game happens to use the name input processing command. However, there doesn't seem to be any way to change/reset an actor's name (other than opening that window and having the player do it manually).
There is an event command that does this for you. On the first tab of event commands under the Actor heading there is the Change Name button. Click that and select the actor and enter the new name there. That does it all for you, there is no need to call a script if you are doing things through events and know the name that you want to change the actor to have.

Original thread: https://forums.rpgmakerweb.com/threads/set-actors-name-to-x.77971/