Check for minimum character count on input?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
LilGames
Posts: 29
Joined: Fri Jul 07, 2023 6:38 pm

Check for minimum character count on input?

Post by LilGames »

Hi, simple question related to input from the player: I can set the character limit to 25 on the input field but how do I add a conditional to prevent less than 3 characters? eg: Loop the node back somehow?
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Check for minimum character count on input?

Post by Tony Li »

Hi,

Please see: How To: Read Input From Player During Conversations

It has an example that requires the input to be 1+ characters, but you can change it to require 3+ characters.

(Side note: If it's a name, there are plenty of names that are only 2 characters: Ed, Al, Hi, Bo, etc.)
Post Reply