Accessed none error trying to retrieve blackboard key

I’ve having trouble accessing my blackboard key value, it keeps giving me an accessed none error from the return value of the ‘Get Value As Bool’ node, I have used this code previously and retrieved the same key with no errors, so I can’t figure out what’s causing the error here. I feel like it’s something simple but I don’t know what.

Please can someone tell me what might be causing it

Thank you

Is the object you’re getting the AI controller of from another level?

Hi, thanks for your reply, no its from within the same level, I just used this code as well in another level to access something within that same level too, sorry if it was unclear

Can you try casting to your AI controller, dragging the “Use Blackboard” node out of it and then dragging the “Get Value as Bool” node out of that? I wanna see if the cast fails.

Hi.
There is a breakdown with your reference somewhere. I don’t know if this video will help, but if you watch from the 17 minute mark forward, maybe it will give you an idea of what the issue might be.

Hi, yes sure, I wasn’t sure what to put for the ‘object’ of the cast node though, any ideas? I tried putting in the same actor from before but apparently it doesn’t inherit the AI controller

this is what I have so far

The AI Controller should go in there :innocent: Oh wait that didn’t work? Try plugging in just controller then

Also, you probably already double checked that but could you confirm that you copy pasted the key’s name in that make literal name node?

Ah right, sorry that probably was pretty obvious, sorry for being slow. So I’ve executed this code and nothing seems to print to the screen meaning that the cast is probably failing

I’ll give it a watch, thanks :slight_smile:

You can make sure that the cast is failing by plugging a print string node into that fail pin. And if that’s the case, that means there isn’t a proper connection between the AI controller and the actor. Could you try getting the AI controller from a different actor?

Hi, thanks for your reply, so I tried it and the cast is unsuccessful


I found that the actor is not using the correct Ai Controller I have set for it, it’s using ‘Ai Controller 0’ which isn’t ‘Dialogue Ai Controller’


Capture

Could you expand on what do you mean by duplication? Are you dynamically spawning AI using blueprints? If so, could you show how you handle that as well? Though if you mean you placed the same model into the scene in your new level, make sure the AI is properly assigned to it’s blueprint.

Hi, I mean I just duplicated the same blueprint and renamed it, then dragged the duplicated one into my new level.

Also I have updated my previous reply, I found that the actor is using the wrong Ai Controller (please read it above), I found where to change it in the blueprint just now i’m now testing to see it’s working :slight_smile:

From your bot’s blueprint’s (self) details panel, check the Auto Possess AI and AI Controller Class settings

1 Like

Many thanks @VisAgilis for helping me, it works now :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.