How can I set the minimum digit of input text?

soramon

Warper
Member
Joined
Dec 16, 2018
Messages
1
Reaction score
0
First Language
Korean
Primarily Uses
VNM
I'm completely newbie.

I want to let the player uses the user name directly through the input text. I'd like to show message that 'You should input at least one character' if nothing is entered. but I don't know how to check and control the digit of text variables stored in the input text.
What should I do in this case?
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,831
Reaction score
5,221
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to VNMaker Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
I've never tried VN Maker, but if its Eventing is anything like RPG Maker's, under "Conditional Branch" you should be able to check whether an Actor (Character) has a certain "Name" applied. Choose that option and enter nothing in the text box. If the Branch is true, tell the player they should enter a name, and present the Name Input box again.
  • If that Name option isn't available but "Script" is available, then you could use a script line to check whether the character's name is equal to "" (an empty string). Someone else would need to give you the code; I don't know what coding language VN Maker uses.
Once you've got that done, you can put it in a loop so it will keep asking until a valid name is entered. The way you do this is you use a Loop event command, and inside that Loop you place that Conditional Branch. Make sure to Check the checkbox for Set Handling When Conditions Don't Apply. I've already told you above what to do if the condition is True, but if it's not (the "Else" branch), place a "Break Loop" command. This will leave the loop as soon as a valid name has been entered.
 

Kentou

Admin
Admin
Joined
Jan 20, 2014
Messages
246
Reaction score
62
Hi, you can just use the Condition command. Basically, what Wavelength said is what you have to do. Except that there is no checkbox for an else branch, you have to drag and drop the "Else" command. Also, make sure that the commands are nested under the Loop, Condition command and also under the Else branch. You can use the left and right arrows keys to do that if it doesn't happen automatically. So that it looks like this:

Code:
Loop
  Condition
    Some Commands
  Else
    Break Loop
The entered name is stored into the variable you have selected for the Input Text command. So you use that variable in the Condition command.

Let me know if that helps you out.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top