How to set Blackboard entries in blueprint (not part of a behavior tree)

I want to set an enum entry in my AIController blueprint when player presses a key, but it doesn’t work.
“Get Blackboard Value as Name” always returns a null value.

I create an enum called ENUM_TaskTypes, and have an enum entry in Blackboard.

Does anyone know how to set and get Blackboard enties in normal blueprints?

I don’t think AIController gets keyboard inputs, maybe wrong, but can you add a print after your “Press P” node to make sure it actually invoked?(right after PressP, and print something simple like ‘hello’)

btw, it would be better that for debug purpose, let level blueprint to take input and then sets instruction status in GameMode, and in your AIController, you can then query GameMode and see what your AI need to do. You can then later on change those states into BehaviorTree’s conditions.

Thanks for reply PenguinTD.

That part actually works fine, I made it just for debug purpose.

But I just can’t get or set Blacboard entires in normal blueprint.

you would need a task to do that, i guess that’s how behavior trees are designed. so you have tasks that sets the blackboard value, and tasks that use blackboard value to do action or branch.

This was answered when posted on AnswerHub here:

https://answers.unrealengine.com/questions/57329/how-to-set-blackboard-entries-in-blueprint-not-par.html

you should mark the person’s answer as accepted if it solves your question.

Thank you guys.

I just update that post. Here’s a screen shot how I solve it.