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
8,471
Reaction score
5,596
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
6,049
Reaction score
5,707
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
248
Reaction score
68
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

I always end up having issues with things i'd never expect.

Capture.PNG

Those friggin mountains man xD
Time for my daily walk/jog ''Literally starts raining while I open the door''
I just discovered there's a giant jellyfish in the Ace RTP. My day is made.
I'm pretty sure I submitted a username change like 4 months ago.
...
No offense but uh, still waiting for my name to be updated :/

Forum statistics

Threads
112,395
Messages
1,068,014
Members
146,046
Latest member
Zheyno
Top