Help improving a Player within Actor bounds test
Hello UE4 community,
can anyone advise me on how I can improve my Player is within Actor Bounds test? I'm getting occasional Blueprint runtime errors when the Get Player Pawn evaluates to: None. This test is used to control doors on a dynamically resizing actor to prevent them locking while the player is on the wrong side.
It still works as intended, but I don't like having errors if I can avoid it. The none property appears to happen before gameplay actually starts. So I am guessing that it is happening in a brief moment before the player pawn exists. The boolean output is tested on an overlap event that (at the time) had not been triggered.
Any thoughts on how I might do this better or prevent that error being generated? Thanks in advance! :-)
asked Aug 22 '18 at 12:09 PM in Blueprint Scripting
Before checking your condition, you can check whether the Pawn is valid, like so:
answered Aug 22 '18 at 12:20 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here