Nevermind. I figured it out.
For some reason, deriving from UStateTreeTaskBlueprintBase doesn’t allow the tick function to work.
After referencing the DelayTask for StateTrees, you have to derive from the struct.
FStateTreeTastCommonBase like this:
USTRUCT(meta = (DisplayName = “Stagger Task”)
struct FStaggerStateTreeTask : public FStateTreeTastCommonBase
{
GENERATED_BODY()
using FInstanceDataType = FYourType;
virtual const UStruct* GetInstanceDataType() const override { return FInstanceDataType::StaticStruct(); }
virtual EStateTreeRunStatus EnterState(FStateTreeExecutionContext& Context, const FStateTreeTransitionResult& Transition) const override;
virtual EStateTreeRunStatus Tick(FStateTreeExecutionContext& Context, const float DeltaTime) const override;
virtual void ExitState(FStateTreeExecutionContext& Context, const FStateTreeTransitionResult& Transition) const override;
}
FYourType is just a plain struct where you add all the fields and variables you want to expose to StateTree editor and Blueprints.
A very roundabout way of doing it, but it’s quite neat after giving this a go.