Is it possible to put the Name of the Selected BB key on our TaskNode?

Is there a way in which the BB Key we assign to the task: Clear BlackBoard Value can be displayed in the node (like MoveTo does when a BB key is selected)? If yes what code is needed?

I did try to discover this by looking at the BTTask_MoveTo source file , theres a lot of code there and my knowledge of unreal is fairly basic nothing obvious lept out at me, might not even be the right file, needle in a hay stack comes to mind!

Override GetStaticServiceDescription() or GetStaticDescription() e.g.

// declaration
virtual FString GetStaticServiceDescription() const override;

// definition
FString UBTService_PlayerLocation::GetStaticServiceDescription() const
{
    return TEXT("Hello");
}

image

Then use in conjunction with FString::Printf to format it with the location.

Thanks Dan, thats great.

Based on your example, I used the GetStaticDescription() as I couldn’t set a override on the GetStaticServiceDescription from my child BT Task class.
Same syntax and ammended the TEXT return to display the keyname supplied by GetSelectedBlackBoardKey() .

image

1 Like

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

Privacy & Terms