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 ([- YouTube][1]), 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.

HI

Have you looked at “Is Valid” Node?

45235-capture.jpg

Hi .

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?

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.

Thanks a lot! This helped me a lot!