[Solved] Text input -- Storing a Variable Text and calling it later (automatic linebreak issue)

Hey there, #EDIT–Issue Resolved

–I am attempting to have the player first enter in the players name.

–So I have a couple commands that are controlling and displaying what the player types:

Object Created – Name_Entry (Text Entry Object)

GlobalVariableString(PlayerName) = Name_Entry.String() #Code runs until the user presses enter.

–I do some irrelevant adjustments to the PlayerName String (I ensure the First Letter is capitalized, and the rest is lowercased).

– Then, I try to call the command in a text box.

– The Text Box is centered to the center of a Chat Bubble (Sprite Object) . (some adjustments get it perfect)

– Then, when I try to call the PlayerName String I get an issue.

I want the Text to Say:

Textbox: “Hey there, “+GlobalVariableString(PlayerName)+”!” + NewLine() + “How are you today?”

And this is what spits out no matter what I do:

Hey there, (UserInputtedPlayerName)
!
How are you today?

So… Any Idea why the heck it’s doing a linebreak after the call for the GlobalVariableString(PlayerName) instead of attaching the “!” on the end?

I want it to be like:

Hey there, Debbie!
How are you today?

–Been Banging my head against the same wall for far too long now. Any help would be MUCH appreciated!

[Tried it straight up, tried adding the exclamation point into an earlier piece of the code, tried a SceneVariable instead, tried BBText and the regular textbox, tried a million things it seems and no luck.]

Never mind. I figured it out…

I set the “Enter” key as the way to break the loop and get out of typing, but that makes it so the User Inputs a Return (break line) after typing whatever the heck they chose as a name

So every name was being entered as Name + NewLine() every time…Glad i figured it out. Sorry If I wasted anyone’s time. I’ll post screens so if anyone else encounters something similar.

1 Like

1 Like