Text input during fights

Fufi_Saintz

Warper
Member
Joined
May 14, 2020
Messages
4
Reaction score
1
First Language
Italian
Primarily Uses
Other
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
 

iCed

Villager
Member
Joined
May 10, 2020
Messages
15
Reaction score
6
First Language
French
Primarily Uses
RMMV
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. :wink:
It's case sensitive by default, but you can change that.
Hope it will help !
 

Attachments

iCed

Villager
Member
Joined
May 10, 2020
Messages
15
Reaction score
6
First Language
French
Primarily Uses
RMMV
...And I just found another one, which allows you to use the keyboard instead. Much more user-friendly !
Hope you enjoy it !
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,651
Reaction score
1,105
First Language
EN
Primarily Uses
RMMV
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.
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.) :kaoslp:

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"
 

Fufi_Saintz

Warper
Member
Joined
May 14, 2020
Messages
4
Reaction score
1
First Language
Italian
Primarily Uses
Other
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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

made a bio for the protag in my project!
Beggar : "I haven't eat for days..."
Kid : "Just do crime! You will get daily necessity for free in prison~"
Stream is a bit late but will be live shortly with some game development! Feel free to drop by!
omg, why persona 5 is so good?

Forum statistics

Threads
99,158
Messages
962,429
Members
130,725
Latest member
teendinsaikha
Top