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"

How can I display a variable onscreen?

Hi everybody:

What I'm currently attempting to do is a create a simple HUD, which just displays one of my character's variables on the screen while the game is running. I have an int variable, and I want its default value to be displayed when the game starts, and update on the fly as that variable changes. Right now I have this set up with print strings, but I want to have it displayed continuous, and in a single spot.

If anyone can tell me how to do this, or point me towards some more information, I'd greatly appreciate it. Thanks!

Product Version: Not Selected
more ▼

asked Oct 03 '14 at 04:07 AM in Blueprint Scripting

avatar image

Chroma Chris
86 20 20 28

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

1 answer: sort voted first

HUD blueprint should do. Create a HUD blueprint and the a Draw Text node in it. Then create a blueprint interface with an integer input > add it to your character BP and HUD BP > Now you can transfer that integer variable from your character BP to the HUD BP via that interface function and event. Setting the size and location of the text is up to you.

more ▼

answered Oct 03 '14 at 04:13 AM

avatar image

16.9k 671 167 678

avatar image Chroma Chris Oct 03 '14 at 05:52 AM

Hey: thanks for your help. If at all possible can you be more specific about how to make the blueprint interface get the variable value and transfer it between blueprints? I've been looking at the blueprint interface documentation, but it doesn't seem to be set up for this kind of functionality, and I haven't figured out how to translate it yet.

avatar image Jacky Oct 03 '14 at 06:03 AM

This tutorial should help: http://www.youtube.com/watch?v=WwfsWr4A894&index=33&list=PLZlv_N0_O1gaG5BW72It4chjhypxIO9ZB

Or check out this series: http://www.youtube.com/watch?v=Eh03YShs9L8&list=UUBobmJyzsJ6Ll7UbfhI4iwQ It has a HUD setup explanation as well.

If not i can post some screenshots tomorrow.

avatar image Chroma Chris Oct 19 '14 at 07:15 PM

Sorry for the delayed response, but just in case anyone else has this problem, this video from the series you listed has the answer: https://www.youtube.com/watch?v=NUrEiaJkn58∈dex=18&list=UUBobmJyzsJ6Ll7UbfhI4iwQ

(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