Announcement

Collapse
No announcement yet.

Storing player text input

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Storing player text input

    I am looking to store whatever a player types on the keyboard in a variable. I can't quite figure out how to do this. The game I am working on is partly a text adventure. It seems easy enough to store a single key stroke (on key press, set var to whatever that key was). Is there a way to do this with whatever the player types up until they hit "enter"?

    #2
    You could give them a widget with an editable text box to type in and use the onTextCommited:

    Click image for larger version

Name:	Capture.PNG
Views:	291
Size:	42.5 KB
ID:	1372277

    Comment


      #3
      So, how would I be able to reference that variable later, in the level blueprint? Basically want I want to is this: The player gets asked a question, they type their answer, and depending what they type different things will happen. The best I can figure is that I would put a multiline text box in the hud. Would this not be the best way? How could I get this to work?

      Comment

      Working...
      X