Clear Blackboard Value node doesn't seem to function

Hey there,

I’m working on making a behaviour tree and added a new custom task that I’ve named BTTask_ResetBBValue. After finding the Clear Blackboard Value node I was hoping I could use this general node/task to clear any BB value that I needed. But it doesn’t seem to be working at all no matter which Blackboard value I have it hooked up to, the value never resets or gets cleared.

The task itself is a really easy set up, but for testing you’ll obviously need someway to input a value through a behaviour tree yourself.

Am I missing something here? Or is it a bug.

1 Like

Hi there,

Which UE4 version are you using? Can you try promoted binaries from the UE4’s github repo? I’ve just gave it a try and it worked like a charm, but I did some changes in the related code two weeks ago and I might have fixed a bug accidentally :smiley:

Cheers,

–mieszko

Please let me know. If it still doesn’t work spare as many details as possible so I can nail it down. Thanks!

I was in 4.6 from the launcher at the time. I can try your suggestion once I get back home. Thanks!

Doesn’t work for me either in 4.6, I’m using set BB value and set it to null instead.

Doesn’t work for me as well in UE4 promoted 2b8bd07e0ec73c55dd00de541825c76ea5a0649d

CodeSpartan’s solution is ok, but it doesn’t work with vectors unfortunately.

I found that
in this file: Engine\Source\Runtime\AIModule\Private\BehaviorTree\BlackboardComponent.cpp
in this function:

 void UBlackboardComponent::ClearValue(FBlackboard::FKey KeyID)

there’s this line:

const bool bHasData = EntryInfo->KeyType->WrappedIsEmpty(*this, RawData);

I changed it to

const bool bHasData = !EntryInfo->KeyType->WrappedIsEmpty(*this, RawData);

and the ‘Clear Blackboard Value’ node started working.

You’re totally right - it’s a bug! Fixed it. Thanks for pointing it out! Keep it coming :smiley:

Cheers,

–mieszko