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"

Use a trigger area to set a variable?

Basically, I want my text box to appear and show dialogue when the player passes a trigger volume. Currently I'm trying to start off by having the trigger box set the HUD's "dilogue" variable to true, but I just can't seem to get anything to work. Here is my level blueprint so far:

alt text

The get hud dialogue function: alt text

I don't get any error messages after testing the game or compiling, but entering the trigger box doesn't set dialogue to true.

Product Version: UE 4.16
Tags:
level.png (99.8 kB)
dia.png (72.9 kB)
more ▼

asked Aug 06 '17 at 05:23 AM in Blueprint Scripting

avatar image

Mataata
6 1 3 4

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

2 answers: sort voted first

do it like this alt text

instead of first person character, use whatever blueprint youre using for your character. Instead of FirstPersonHUD, use whatever your default HUD class is (you can go to Edit > Project Settings > MapsAndModes to find out!). checking if its valid is unnecessary, and you definitely dont need to check it twice. If youre constantly changing hud classes in your game, then i suggest you use widget blueprints itll be a lot easier.

capture.png (123.2 kB)
more ▼

answered Aug 06 '17 at 06:03 AM

avatar image

ViceVersa
1k 64 50 98

avatar image Mataata Aug 06 '17 at 06:14 AM

Interesting.. I'm not really sure what's going on here. I renamed my hud asset to hud_game so it's easier to understand which is the class and which is the asset.

alt text

I checked hud_game's references, and it seems it related in some way to the HUD class. alt text

hud.png (111.0 kB)
hud2.png (125.1 kB)
avatar image ViceVersa Aug 09 '17 at 06:37 AM

idk how much work youve put into it already, but maybe try making a new hud class and copying the bluedprints over? im not sure why it would generate that error

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

There is no reason for you to call Get HUD Dialogue, it isn't performing any task.

As long as your Hud variable is set and not null. It should be working.

Press F9 while selecting a node to toggle debug on that node, and see where the execution goes when you enter the trigger.

more ▼

answered Aug 06 '17 at 06:00 AM

avatar image

BenVlodgi
2.2k 39 17 52

(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