Password input script

I've been reading alot of posts, and if this is in the wrong thread i apologize but i'm not entirely sure where else to put it. I want to have a code which would run when you click on a certain event, resulting in a prompt to input a 'name' which would be registered as a 'password' and checked against several different variables. when the inputted 'password' matches a variable it than turns on said variable, unlocking a door.

I currently have a partial script test started, where if the [name] matches a [variable] the [password] should be displayed in a text box so i can see if it is working. once i get this working i want to exchange the text for a switch to turn on the variable and the character saying "a door unlocked", but i don't know how to

1. make it so a text box appears normally via code

2. place/change the face which normally appears with a text box

3. turn variables on/off in code

Here's my current test code

Spoiler
if $game_actors[15].name == $game_variables[3]

 @>Text: 'mehappyish', 0, Normal, Bottom

:"Child"

elsif $game_actors[15].name == $game_variables[4]

 @>Text: 'mehappyish', 0, Normal, Bottom

:"Loss"

elsif $game_actors[15].name == $game_variables[5]

 @>Text: 'mehappyish', 0, Normal, Bottom

:"Running"

elsif $game_actors[15].name == $game_variables[6]

 @>Text: 'mehappyish', 0, Normal, Bottom

:"Prisoner"

elsif $game_actors[15].name == $game_variables[7]

 @>Text: 'mehappyish', 0, Normal, Bottom

:"Regret"

elsif $game_actors[15].name == $game_variables[8]

 @>Text: 'mehappyish', 0, Normal, Bottom

:"Kitandcat"

else

 @>Text: 'mehappyish', 0, Normal, Bottom

:"there is no password"

 

end
 

Can someone help me please?
You can do this easily via events.. You can make those comparisons using the Script method of the Conditional branch.
To give you more than the info that it's usually done by eventing - there is a blog tutorial about exactly that:


http://blog.rpgmakerweb.com/tutorials/password-input-using-actor-names/
Tsukihime's Text Input script can already do this.


You should look that up for reference if you want.


It operates the same way what you described.


Calls up a name window without an actor face, the player can put a "name" there, and once the scene is finished (text inputted, confirm button pressed), it saves the result in a variable, which can then be used in conditional branches with the script command.
Ok, but here's the thing i want to use a password like "Child" not a string of numbers, would these methods (haven't checked yet so if this makes me look stupid i apologize) still work?

also, sorry it took so long to reply to your posts- i was preocupied
Nevermind, thank you for your help, i figured it out!
Kit and cat, could you please share how you did this? I'm intrigued in how it is setup.

Original thread: https://forums.rpgmakerweb.com/threads/password-input-script.32615/