Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
Applies a probablity to the application conditions of the Gameplay Effect.
| Name | UChanceToApplyGameplayEffectComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayEffectComponents/ChanceToApplyGameplayEffectComponent.h |
| Include Path | #include "GameplayEffectComponents/ChanceToApplyGameplayEffectComponent.h" |
Syntax
UCLASS (DisplayName="Chance To Apply This Effect", MinimalAPI)
class UChanceToApplyGameplayEffectComponent : public UGameplayEffectComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UGameplayEffectComponent → UChanceToApplyGameplayEffectComponent
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ChanceToApplyToTarget | FScalableFloat | Probability that this gameplay effect will be applied to the target actor (0.0 for never, 1.0 for always) | GameplayEffectComponents/ChanceToApplyGameplayEffectComponent.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FScalableFloat & GetChanceToApplyToTarget() |
Get the configured chance to apply to target | GameplayEffectComponents/ChanceToApplyGameplayEffectComponent.h | |
void SetChanceToApplyToTarget
(
const FScalableFloat& ChanceToApplyToTarget |
Set the chance to apply to target | GameplayEffectComponents/ChanceToApplyGameplayEffectComponent.h |
Overridden from UGameplayEffectComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanGameplayEffectApply
(
const FActiveGameplayEffectsContainer& ActiveGEContainer, |
Determine if we can apply this GameplayEffect or not | GameplayEffectComponents/ChanceToApplyGameplayEffectComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostLoad() |
Warn of errors in the Editor | GameplayEffectComponents/ChanceToApplyGameplayEffectComponent.h |