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"

UMG Event Construct Execution Order

I have been trying to implement a simple HUD, which displays Character Blueprint information such as Health. I followed the Unreal tutorial on YouTube (https://www.youtube.com/watch?v=VjKY6z6uP0M), but I am getting issues with the "Get Player Character" function call: it always returns None. I have tried to take the same chunk of logic and set it in the Tick, and it does in fact work, hence the reason why I know this is an ordering issue. My setup is not exactly the same as in the YouTube videos as the clients that render the UMG blueprints are over a network, which leads me to believe it might be a network timing issue (i.e. the Pawn hasn't been loaded before actual Event Construct UMG logic begins).

The workaround I am currently using is simply to have it in the Tick logic and just check whether the variable has been set or not, but I guess it's inefficient, and bothers me not knowing what the issue actually is. So my question is: Does anyone know what the order of execution is for the Event, and the setup I have in general? Is there a way to prevent Event Construct to execute before the pawn is spawned?

PS: I tried Get Owning Pawn as well, and it returned None.

alt textalt text

Product Version: UE 4.7
Tags:
hud.jpg (431.3 kB)
character.jpg (332.0 kB)
more ▼

asked Jun 04 '15 at 06:45 AM in Blueprint Scripting

avatar image

hardballs
23 8 12 14

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

2 answers: sort voted first

HI Mate

Have you looked at "Is Valid" Node?

alt text

Narg

capture.jpg (29.8 kB)
more ▼

answered Jun 04 '15 at 07:53 AM

avatar image

Narghile
1.7k 74 38 110

avatar image hardballs Jun 04 '15 at 04:50 PM

Hi Narghile.

I'm not sure what you want me to do with the "Is Valid" node. The issue I am having is from the "Get Player Controller" node, which gets executed before the "Cast" node in the sequence. If I add the "Is Valid" node, it still always fails to achieve what I need, which is to get the reference to the owning character upon "Event Construct".

I am missing something with your suggestion?

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

Hey there,

If you're still looking for a solution to this, What i did to fix this was implement a very small delay (like 0.0000001 seconds or something) after Event Construct and that seemed to fix it.

Cheers.

more ▼

answered Jul 04 '15 at 12:13 AM

avatar image

cgfxs
1 1

avatar image LoN Aug 26 '17 at 07:39 PM

Thanks a lot! This helped me a lot!

(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