x

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 the value of variable on the screen?

Hi! I try to display value of variable GOAT_SAVED from "cage" BP on the screen on HUD but I don't know how to do that. I tried many ways but nothing works. :/ alt text

alt text

Product Version: UE 4.12
Tags:
bp.png (179.9 kB)
bp2.png (135.1 kB)
more ▼

asked Sep 03 '16 at 04:08 PM in Blueprint Scripting

avatar image

Jakubinioo
8 1 2 5

avatar image mdonge Sep 03 '16 at 09:06 PM

First, your widget blueprint need a reference to your actor (where the variable is). the easiest way : when you spawn the widget, you can set the owner of the widget, then in the widget you can use "get owning pawn" ...

Good luck !

avatar image Jakubinioo Sep 04 '16 at 08:53 PM

Thanks for answer. When I try to set owner and then compile and play, I have this error. Can you show me how to do that? I' ll be very thankful :) alt text

bez tytułu.png (228.0 kB)
avatar image mdonge Sep 05 '16 at 12:37 PM

Set the owner with the spawn function, where you choose the blueprint to spawn. There is a owner node under !

avatar image aristides Sep 04 '16 at 11:53 PM

Store your variable someplace where you can get access to it. I store them in my GameMode blueprint (I know it might not be the best place). Then bind a blueprint to the text field in your widget.

alt text

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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