diff --git a/Source/Flow/Private/Nodes/Actor/FlowNode_ComponentObserver.cpp b/Source/Flow/Private/Nodes/Actor/FlowNode_ComponentObserver.cpp index 770c0d26..03e1a998 100644 --- a/Source/Flow/Private/Nodes/Actor/FlowNode_ComponentObserver.cpp +++ b/Source/Flow/Private/Nodes/Actor/FlowNode_ComponentObserver.cpp @@ -40,7 +40,11 @@ void UFlowNode_ComponentObserver::ExecuteInput(const FName& PinName) void UFlowNode_ComponentObserver::OnLoad_Implementation() { - if (IdentityTags.IsValid()) + if (SuccessLimit > 0 && SuccessCount == SuccessLimit) + { + TriggerOutput(TEXT("Completed"), true); + } + else if (IdentityTags.IsValid()) { StartObserving(); } @@ -121,9 +125,9 @@ void UFlowNode_ComponentObserver::OnComponentUnregistered(UFlowComponent* Compon void UFlowNode_ComponentObserver::OnEventReceived() { + SuccessCount++; TriggerFirstOutput(false); - SuccessCount++; if (SuccessLimit > 0 && SuccessCount == SuccessLimit) { TriggerOutput(TEXT("Completed"), true);