I am trying to make a simple waypoint system for my NPCs to move around. Basically I want my waypoint blueprint to set a blackboard key vector value for my NPC. However the key never gets set and I get this error log;
Error Blueprint Runtime Error: Accessed None trying to read property CallFunc_GetBlackboard_ReturnValue from function: ‘ExecuteUbergraph_Waypoint_Behavior_A’ from node: Set Value as Vector in graph: EventGraph in object: Waypoint_Behavior_A with description: Accessed None trying to read property CallFunc_GetBlackboard_ReturnValue
So, first the usual basic checks:
In your Controller class, are you assigning the BT and Blackboard assets on BeginPlay?
And, when is the waypoint function called? If you call it on your first Tick, then this is the reason for the issue; As a default, the first Tick is called BEFORE the BeginPlay Event, so in that case the Blackboard is not yet assigned. There is a property somewhere in the Tick-Options of the Actor/Controller so you can disable ticking before BeginPlay (dont remember exactly where and how its called ); But if in doubt, you could just always check the BlackBoard value with an isValid and only then execute the “SetWayPoint” function.
Thanks ! You were right; I called the function waypoint function before the BeginPlay Event. I just added a delay node before calling the waypoint function and now it works.
I had this issue and it turned out that I had another Blueprint character incorrectly assigned to this AI controller but missing the proper Event Graph.,I had this issue and it turned out that