Strange issue with blackboard keytype getting empty

I have a strange issue, ive made a blueprint thats going to update from a targetpoint, the target point can have a “next” var wich is a targetpoint or an “option” var wich is an array of target points.

Everything runs fine but for some strange reason from time to time my Value current waypoint get’s empty for me without reason it runs trought the blueprint fine and then the next moment that value is empty.

Anyone having the same issue?

Its the “CurrentWaypoint” variable that gets empty not the “PreviousWaypoint” one

Route Update blueprint:

[link to total image][2]

Behavior Tree:

Im rly clueless what causes this issue, ive allready tried making all the actors into objects without luck. For one strange reason (for no appearent reason as far as i can see) the var gets null and then the cast failes and the Whole Ai hangs…

hard to tell what’s going on here, but to resolve issues with null variables, sometimes i’ll add a selector to handle this. so you would create a selector and name it 'HaveWaypoint?" or something, add a decorator that simply has whether or not CurrentWaypoint is set, then assuming it is, it will follow the walking branch. this decorator would ‘abort: self’ so anytime current waypoint is not set, the branch aborts, at which point you could force the decision tree into a new branch that forces a value to be assigned to the CurrentWaypoint.

um sorry if i intrude…

can anyone help?

Solved via a work a round where i keep checking if its empty or not, the blackboard keytype keeps getting empty but i can now work with it.

um sorry if i intrude…


check the types of the Blackboard Values and make sure you set them right as “set blackboard values as type

Thats not the issue it does get set but from time to time it gets empty (for no apperant reason).

I aded a extra blackboard keytype so i can backtrack and force it to fill it agian with the last known value.

seems you are setting anywhere as empty

Yeah it gets empty somewhere but i cannot find out where it happens.

Since the value is set when it leaves and then sometimes (not even always) when it renters the blueprint its empty.

But i found a sort of solution for it so i stopped looking