Name Input Event for MV

Hi all,

I was wondering if there was a way to use a conditional branch in conjunction with the name input during an event? I would like to know if it was possible to have the conditional branch check an actor for a specific inputted name? I know you can check for a specific actor in the party but that is not what I want to do at all. I would use this in a game as a way to input various options/cheats.

Thank you everyone in advance.
Moved to: RPG Maker MV SupportIn the future, be sure to post questions about how to use events or the editor under the engine's Support subforum (Game Ideas and Prototypes is for sharing design ideas for new games or new mechanics and getting holistic feedback on those ideas). If you were asking about a different engine than MV, just @ me and I'll move it over to the right place.
To compare a name to some particular text (case-sensitive) you can use:
Conditional Branch > (page 2) > Actor > Name​

If you want to make it case-insensitive, I mentioned a few options over in this Steam discussion: "Can you make a player have to type an answer to a question?"
Caethyril said:
A typical solution is to make an actor whose only purpose is for name input. You can use the Name Input Processing command (page 3 of event commands) to get the player to input a name for that actor. Then Conditional Branch > Actor > Name to check against the correct answer:
Code:
◆Text:None, Window, Bottom
:    :What's the password?
◆Comment:Set name to blank
◆Change Name:PasswordGuy, 
◆Comment:Get name input
◆Name Input Processing:PasswordGuy, 8 characters
◆Comment:Check name against correct answer
:       :(Conditional Branch > Actor > Name)
◆If:Name of PasswordGuy is Potato
  ◆Text:None, Window, Bottom
  :    :Correct! You may enter the house of potatoes.
  ◆
:Else
  ◆Text:None, Window, Bottom
  :    :Nope, that's not it.
  ◆
:End
If you want to be able to actually type using the keyboard, Yanfly has a plugin for that: http://www.yanfly.moe/wiki/Key_Name_Entry_(YEP)

Note that the Conditional Branch check will be case sensitive. If you want a case-insensitive check, you could try this instead, in Conditional Branch > Script:
Code:
$gameActors.actor(6).name().toLowerCase() === "potato"
Change the number to match the ID of the actor, and replace "potato" with your answer, in lower-case. Remember to keep the quotes around it, e.g. "king leo". =)
@caethyril Thanks for the quick reply. I will try your solution out tomorrow to see if it will do what I want. I'm ok with the name input being case sensitive too.

EDIT: This actually works great, it turned out to be a lot simpler than I thought. I actually only wanted to check if a name was in the party but checking a specific actor after naming them works well too. Thank you for your help.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/name-input-event-for-mv.116575/