Accessed none trying to read property (Bad Blueprint communication)

Hi there,

in my game, i want to spawn an AI when the player does something. It seems like the engine has a problem with the way that i am setting the variables in there.

So this is the output log :

This is the behavior tree when it is hostile (perform condition check is inside the BTD_IsInAttackRange) :

Here i am setting the Enemy Blackboard Key (BTS_TargetSensedPlayer) :

and this is the PerformConditionCheck Function :

However, the Game works as intended, even when i spawn the AI. How do i solve this ?

Thanks !

Instead of using != nothing try using the Isvalid node or isvalid boolean into you branch.

Edit: Actually casting should take care of the valid check by itself (if im not mistaken), so you should be able to remove both of the != checks.
Hope that helps.

No problem, What exactly did it fix and what messages are still popping up? You are getting three separate errors, the last one is just happening constantly.

Hey , thanks for your quick answer !

Although this fixed some other issues, the initial message persists.

I feel like it still has a problem with how i want to access a nonexistent actor :frowning:

There were some other issues with the reference inside my level blueprint for a soundcue that is dependent on the players and the AIs position. I don’t think thats part of the problem.

I still get all of the messages ust like in that first screenshot.

Hi would you mind showing the DemonAiBP and the DemonController. its complaining about you setting a vector and a enum, probably a good place to start looking.

Yes you were right.

At first i got rid of the IsInAttackRange on the right side because i realised that i do not need it for my AI. After that, i reroutet the GetActorLocation to a Self reference instead of the Variable that gets the Spawned AI and set the SetValueAsVector to that. I also got rid of the SetValueAsEnum because i do not need the AI to be in that Enum State.

I ran multiple trys without any errors. Thanks for your help :slight_smile:

Hey there,
Good to hear you solved the issue, glad that I could help!
Would you mind marking the answer as solved? For tracking reasons and so that other people know the question is solved. (it’s the check box that turns green next to the answer on the left)