How to display player-inputted text in-game?

I’m not looking for any kind of step-by-step on this (though I wouldn’t be opposed to it), just where I should begin with implementing this feature. The idea is that the player could “Use” a terminal/computer in-game, at which point movement would be disabled and any letter or number typed by the player on the keyboard would display on the terminal screen in-game, as if they were typing into it directly.

How can I best go about getting player input to display in this way? I would prefer to stay in the realm of Blueprints, if possible. Thank you.

Hey vivalabugz, thanks for the response! You know the terminals in the Fallout series, where you can access them and then select options from a series of menus or select individual words to hack them? Example: Fallout 4 Terminal Hacking Guide - YouTube.

I’m creating something like that, except instead of selecting pre-determined options, the Player is able type into that in-game terminal to do things.

Its pretty much the same widget setup. I’ve updated it to look a little more similar now.

The player controller’s BP is the same. You just have to make sure you set the focus to be the text box you want your player to type in.

There’s a function OnTextCommitted in the widget you can use. When the player hits enter it will take what they typed and add it to another text box

192475-giphy+(3).gif

1 Like

You should start by creating a widget blueprint. In there, add a Text Box.

In your character widget, with whatever button you’d like to start displaying the widget with, create the widget and add it to the viewport as focus. Ignore your character’s move and look inputs. The text box should automatically be in focus and you should be able to type in it. Is this what you were looking to do?

I have been looking into this as well, is there any way that this is possible and for the system to check if it is one of a list of certain words? This way the game could react depending on what is typed.

Hey capitjeff211,

Sorry for the late response. Sure thats totally possible. After getting the input string from the user you can use the “Parse into Array” node with your source string as the user input and the delimiter could be a space(for this instance). Then you can use a for loop to iterate through the array that the “Parse into Array” outputs and compare each to a string with your word or words