Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Creating a Speech Bubble that the Player can type into in game

Hello all! I'm currently working on a project that has the player type sentences in game, like Elegy for a Dead World. However, I wanted to have the writing prompts appear above the player in a speech bubble. I'm going to list below what all I think I need to make this blueprint work and what all I have tried so far. As a quick heads up, when I started this project I was doing it in 4.12 and now it has changed to 4.16. Any help would be greatly appreciated and I will try to respond as soon as I am able. Thank you.

Things needed to make this work:

  • An interactive object / area that prompts the player to write.

  • The ability to place multiple versions of this blueprint in throughout the level.

  • The blueprint needs to allow for the player to type using a keyboard.

  • A speech bubble that appears over the player character.

  • The speech bubble needs to be able to change shape depending on the amount of characters typed.

  • The typed text needs to have word wrap implemented.

  • Upon completion the object / area can no longer be interacted with.

  • Upon the completion and entering of the text, it needs to be stored for later use.

  • The entered text can be recalled and appear in the order that the player entered to prompts.

  • The recalled text is displayed as a series of journal-like entries.

    Things that I've tried:

  • I tried following along in this video "Player can type in stuff onto the HUD" and got it to work. But I couldn't figure out how to incorporate the text into a speech bubble and creating a keyboard event for every key caused problems in game when I needed to press other keys for other mechanics.

  • Using that same basis for the typing, I decided to see how far I could get with making a trigger box initiate the typing blueprint. I got the blueprint to work when the player entered the trigger box, but if I had more than one typing blueprint in the level it caused some of them to just not work entirely.

  • I changed it so that all trigger boxes were located in one blueprint and just moved them around in the level to hopefully solve the problem of blueprints interfering with one another and this worked. However the way it is setup the blueprint only stores one entry and deletes the rest.

  • I tried to figure out how to get arrays to store the text entries but it's a bit beyond me at the moment.

  • I've look into the Blueprint Example Project as a potential solution for the speech bubble to change size based on text.

  • I've looked into 3D widgets, although I am not that experienced when it comes to UMG.

Product Version: UE 4.16
more ▼

asked Aug 26 '17 at 12:07 PM in Blueprint Scripting

avatar image

1 1 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first
  • You will want to make this in a Widget.

  • Use the WidgetComponent in your blueprint to place it in the world

  • To make it look like when you type that there is suggested text, I suggest you layer two Text Boxes over each other, the one in front to have them type in, the one in back, to have the same starting text plus the next suggested word appended at the end. Also make the text in back a different color, like a lighter gray. Whenever the text in the typing box updates, update the backing text.

  • The algorithms for text prediction / interpretation are up to you.

more ▼

answered Aug 27 '17 at 11:35 PM

avatar image

2.1k 38 17 52

avatar image Operchniki Aug 29 '17 at 09:21 AM

Thanks for the reply! I ended up spending a good while looking into widgets and got the bare bones of this mechanic working. I'm thinking once I get some free time I will do a write up explaining how I got it to work and what steps need to be taken to replicate it. Just in case someone else wanted to do something similar.

The only things I haven't gotten to yet is the text being recalled and then used in a journal. But I'm hopeful that I will get it done this weekend!

avatar image BenVlodgi Aug 29 '17 at 05:03 PM

By "text being recalled", do you mean being saved for later use? You can access the text property of the TextBox then store it in an array or something.

Also if my answer helped you with your solution, could you up-vote/mark as answer?

When you do have a finished solution you should add it as a Community Tutorial, and then link to it in your question

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question