Text input during fights

Hi everybody,

just searched for my answer here in the forum but didn't find.
I am a (gamer and a) teacher who would be very pleased to make a game to make my students learn while having fun.
I just want to know if it is possible to make at some point in the game (especially during battles) the player type some answer to perform some actions (hit the enemy, most of all).
If so, is it difficult to do (hard scripting) or easy for a beginner like me?
Many many thanks and regards
Hi @Fufi_Saintz !
I was just looking for something like that when I discovered this thread from @darkkitten who developed a very simple plugin that could help you.
I tried it and it works great. Doesn't work during battles though, but enough to make some good riddles for your students I guess.
Great idea by the way, to mix game and studies !
You can take a look at my screenshot to see how I used it, for testing - don't know what you're teaching, but I tried it with physics to test a string with an equation. 😉
It's case sensitive by default, but you can change that.
Hope it will help !
...And I just found another one, which allows you to use the keyboard instead. Much more user-friendly !
Hope you enjoy it !
A classic no-script/plugin option is to make a new actor just for text input, use the Name Input Processing command to get input (i.e. change their name), and Conditional Branch > (page 2) > Actor > Name to check that input. E.g.
Spoiler: Event example
Code:
◆Text:None, Window, Bottom
:    :What's the password?
◆Comment:Set name to blank before input
◆Change Name:PasswordGuy, 
◆Comment:Get input!
◆Name Input Processing:PasswordGuy, 12 characters
◆Comment:Check input!
◆If:Name of PasswordGuy is Password
  ◆Text:None, Window, Bottom
  :    :You must be a new member of our top-secret club!
  ◆
:Else
  ◆Text:None, Window, Bottom
  :    :Nope.
  ◆
:End
This method has some limitations: 16 characters max, and it uses the in-game "keypad" for input rather than letting you type directly. (Plugins may mitigate some of these limits.) 😴

If you want to do something like ignore case (so "password", "Password", and "pAsSwOrD" are treated as the same input) then you'd be best off using a scripted condition instead, e.g. Conditional Branch > Script:
JavaScript:
$gameActors.actor(5).name().toLowerCase() === "password"
Thanks people, I have been trying your solutions in the last hours, all are great!
Can't wait to show you a piece of my work to get some feedback!
Also, thanks @iCed for supporting the idea of mixing learning with playing

Original thread: https://forums.rpgmakerweb.com/threads/text-input-during-fights.121533/