Accessed none error when trying to set blackboard value as vector

Hi

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

This is my waypoint blueprint;

And this is my behavior tree;

I have tried printing the Current Waypoint location to a string and that turned valid. So did the NPC Master character variable.

Any thoughts on what I am doing wrong?

Thanks in advance :slight_smile:

And this is my blackboard;

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 :confused: ); But if in doubt, you could just always check the BlackBoard value with an isValid and only then execute the “SetWayPoint” function.

Hope that helps.

Cheers,

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.

Thanks a lot :slight_smile:

Hey Copenhagenjazz can you show me what exactly did you do to solve this issue?

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

just add a delay node between event beginplay and set value as object with time 0:0 .

you are a saviour