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 to get a reference to a UMG widget in the level blueprint?

Hey, I'm having a bit of trouble getting event dispatchers to work in ue4. Bear with me, I'll explain what I'm trying to achieve first, then get to the meat of the problem. This is for a murder mystery game. I have some textures of flat areas on some static meshes in front of the player character. They do not have control over the camera, so the image of the room is their entire world. As they stand in front of each static mesh, they are overlapping a trigger box. Upon overlapping, a widget is cast to their viewport. I also have some 360 investigation scenes with a spherical photo on a sphere static mesh- in these, the player may control the camera and look around. To move from area to area, I'm trying to set up an event dispatcher that will communicate between the widget and the level blueprint, as the level bp seems to be the only place I can get a reference to any character... tell me if I'm wrong, and if there's a different way to go about this. Upon clicking a button, the player should teleport to a new area, ceasing overlap with one trigger box and beginning overlap with another, allowing for separate UMG widgets to be displayed, so they can act as new "areas". I'm also wanting to use an event dispatcher so that I can possess a different character- the one with the camera controls. This would be achieved by using a transform node first, teleporting character one to an empty area, and then using a possess node, and vice versa for switching back with character two. So that's the background out of the way, now for the problems. The "evidence" variable being used in the first picture is from a trigger box in the level, which is featured in the second picture. The overall idea is simple enough, when they're in the box, create the widget and cast it to the viewport. When they're not, remove it from parent. However, I'm not sure I'm correct with the following- my line of logic is that I could promote it to a variable in this BP as I create the widget, due to the fact that this is the blueprint responsible for creating the widget. The functionality promotes it to a variable upon overlap. If that overlap does not happen, then the branch sets it to false and it's removed from parent, as stated before... however, that variable reference seems to be behaving strangely, as I'm sure you can see in picture one: I don't know what it's asking for. Picture four shows the error that it's receiving, but I don't understand it. Picture three shows the level itself so you can get an idea of the sort of place I'm making. Also, a smaller problem- in picture one, the transformation and rotation node... is that setting correct if I want to teleport ParlourChar to the xyz coordinates of 5,5,5? The only real reason I doubt it is because this tutorial https://www.youtube.com/watch?v=68pmsZ2L3PE uses these nodes https://docs.unrealengine.com/…/Behavior/GetValue/index.html and I'm having trouble finding their function or how to use them, as it isn't explained in the video. Sorry for the wall of text, and I appreciate your time.



Product Version: UE 4.17
more ▼

asked Oct 13 '17 at 09:57 AM in Using UE4

avatar image

16 1 2 3

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

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