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 text once a player has completed their current objective on the HUD with Blueprints?

Hello,

I've been trying to call a function on my HUD blueprint from one of my actor blueprints. I've tried to use the "Get Game Mode" node and then use the "Get HUDClass" node to get a reference to the HUD blueprint but it doesn't show my functions when I do this (I did make sure the functions are public). What I want to achieve is display some text in the center of the screen once the player has completed their current objective, I know how to handle that but I don't know how to properly get a reference to the HUD blueprint.

Any help would be greatly appreciated.

Product Version: Not Selected
Tags:
more ▼

asked May 01 '14 at 08:48 PM in Blueprint Scripting

avatar image

Spiderhund
175 10 10 22

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

1 answer: sort voted first

Hey Spiderhund,

When you need to reference your HUD blueprint, you should use Get Player Controller to call Get HUD. From that, you should drag off the Get HUD's Return Value and search for Cast To YourHUDClass. From the Cast To node, you can drag off the As YourHUDClass pin and search for your custom functions.

Here's a screenshot example of that setup:

alt text

Hope this helps out!

casttohud.png (47.7 kB)
more ▼

answered May 01 '14 at 09:55 PM

avatar image

Steve Allison STAFF
4.3k 123 58 209

avatar image Spiderhund May 01 '14 at 10:22 PM

Thank you!

Seems I've been looking in the wrong place this whole time :P

(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