Sure… here is an example of how to do a Number only Input (only allow numerical Inputs with or without “.” or “,”).
Important if you wanna copy this: I created a LocalVariable inside the Function, called “NumHolder”, to store the outcome before returning.
And here is, how to use this Function:
On TextCHanged, i check against the Text, if it only includes numerical signs (without ./,), to return an Integer Value only.
So, you may ask, how to check against words now…
A new Function like my GetNumeric above… I calll it “GetTrusted”.
We remove the Integer return and only use a String as Input and Outcome.
We also need a Variable String Array, i call it “BlackList” and this will be filled with all the bad Words, Phrased or other Signs and Stuff.
AND, that is important, we use a Local Variable. Within Functions, you can create Local Variables at the Bottom of the Variable Panel. I call it “WordHolder” and make it a String Array.
You are filling the BlackList by yourself. If you need it globally (in every Widget, Actor or else), put this BackList Variable into GameInstance and use
GetGameInstance -> CastTo CustomGameInstance -> Get[BlackList]
If your BlackList contains the Word “Numbatz” and a Player is writing it… he can write “Numb atz” or “N umbatz” as he wishes… since this only checks against the full word. This is just an example of how to make a Type->Check->Correct System works.
If he writes out “Numbatz”, the word will be deleted right away.