UBehaviorTreeComponent::GetTagCooldownEndTime
#include "BehaviorTree/BehaviorTreeComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallableconst
Description
Returns the world time at which the given cooldown tag's duration ends, or 0.0 if the tag has no active cooldown. Used with Cooldown decorators keyed on gameplay tags.
Caveats & Gotchas
- • Returns 0.0 both when the tag was never set and when its cooldown has already expired and not been re-added — don't treat 0.0 as an error state.
- • The returned time is an absolute world time (comparable against GetWorld()->GetTimeSeconds()), not a remaining duration.
- • Requires the GameplayTags plugin/module dependency for FGameplayTag.
Signature
double GetTagCooldownEndTime(FGameplayTag CooldownTag) const; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| CooldownTag | FGameplayTag | The gameplay tag identifying the cooldown to query. | — |
Return Type
double Example
Check remaining cooldown C++
const double EndTime = BehaviorTreeComponent->GetTagCooldownEndTime(CooldownTag);
const double Remaining = FMath::Max(0.0, EndTime - GetWorld()->GetTimeSeconds()); Tags
Version History
Introduced in: 5.1
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?