How to assign blackboard variable?

Still learning the blackboard and behavior tree system. I’m trying to figure out how to set a variable in the blackboard. Do I do it in the controller? and if so, what event do I call?
Any examples would be super helpful! Thanks.

Yes, usually one would set blackboard values from the ai controller, or in a behavior tree task.

To do so, use one of the SetValueAsType nodes which matches the key being set. For example, I initialize my blackboards and store my pawns’ spawn position there like this in the ai controller’s OnPossess event:

Thanks. Does that event fire more than once? I basically want to update my AI character’s health but not sure what event to call to do that.

OnPossess only fires once. Probably shouldn’t store health on a blackboard really. Usually better to do it on the pawn since that’s where damage events generally take place. Could have the damage event call a function on the controller which sets a health blackboard key though. But if you need behavior tree to think about health, is probably best to just grab the health variable from the controlled pawn in a task or service.