Event Receive Execute returns NULL owner and pawn

Hello,

so I am not sure if this is expected behaviour or not but I am pretty confident it is a bug.

When using the node “Event Receive Execute” (here on an AI character) in the behavior tree, the out pins “Owner Controller” and “Controlled Pawn” both yield NULL values.

If you place a delay just after the node, the values then get more time to get set and will return NON NULL values.

Tested example :

IF this is NOT a bug, could someone please explain me the reason why this is an intentional behavior ? It seems quite misleading for beginners like me. Thank you !

Just a lil’ bump since I posted on the weekend and I guess the staff only work from monday to friday, I would really like to know if this is a bug or not …

Hey Dinfael,

After reading over your question, this does not appear to be a bug. There will occasionally be times when you are attempting to access a property from something that has not been initialized yet, which can lead to it returning a null value. Placing the delay is the proper way to get around that behavior, which occurs mainly because there is no set order that events will run during runtime. Just to clarify, whenever you run into this issue, placing a short delay as you have done is the correct thing to do, and should prevent you from running into any further issues.

Have a great day!

Actually it is just half a solution as Delay node just after the receive execute can lead to other issues, not bugs, but it interferes with tick events and such on the actor and eventual children or other dependent actors.

Also, 0.1 second is quite a long time but it does not seem to work if having a shorter delay (for real it depends on the scripts, some accept shorter delays, I guess it depends if the leading blueprint is heavy or not) .

I guess the only real solution is to go through C++ instead of blueprints but then it is quite sad for non-programmers :confused: … Anyway, thanks for your answer Sean Flint !