Interface IAttributeSet
An IAttributeSet defines the list of IAttribute that a player (that has an AbilitySystemComponent) possesses.
The attributes themselves are assigned to the IAttributeSet by dragging
This will usually include IAttributes such as Health, Mana, Speed, etc.
Namespace: GameplayAbilitySystem.Interfaces
Assembly: Assembly-CSharp-firstpass.dll
Syntax
public interface IAttributeSet
Properties
| Improve this Doc View SourceAttributes
List of IAttribute that belong to this IAttributeSet
Declaration
List<Attribute> Attributes { get; set; }
Property Value
| Type | Description |
|---|---|
| List<Attribute> | List of IAttribute |
AttributeValueChanged
Event called whenever a attribute value changes
Declaration
AttributeChangeDataEvent AttributeValueChanged { get; }
Property Value
| Type | Description |
|---|---|
| AttributeChangeDataEvent | Event is raised with a payload of AttributeChangeDataEvent |
Methods
| Improve this Doc View SourceGetOwningAbilitySystem()
Gets the AbilitySystemComponent that owns this Attribute Set
Declaration
AbilitySystemComponent GetOwningAbilitySystem()
Returns
| Type | Description |
|---|---|
| AbilitySystemComponent | Ability System Component which owns this IAttributeSet |
PostGameplayEffectExecute(GameplayEffect, GameplayModifierEvaluatedData)
Called after modification to attribute. This should be used to execute reactions to attribute change, such as dying when health is 0, or showing a "damaged" animation when health decreases
Declaration
void PostGameplayEffectExecute(GameplayEffect Effect, GameplayModifierEvaluatedData EvalData)
Parameters
| Type | Name | Description |
|---|---|---|
| GameplayEffect | Effect | Effect that was executed |
| GameplayModifierEvaluatedData | EvalData | Attribute modifier |
PreAttributeBaseChange(IAttribute, ref Single)
Called before modification to the base attribute value. This should be used to enforce clamping rules (e.g.) health can't be greater than max health.
Declaration
void PreAttributeBaseChange(IAttribute Attribute, ref float NewBaseValue)
Parameters
| Type | Name | Description |
|---|---|---|
| IAttribute | Attribute | |
| System.Single | NewBaseValue | New value of the attribute. This is passed as ref, so this method can modify it. |
PreAttributeChange(IAttribute, ref Single)
Called before modification to the current attribute value. This should be used to enforce clamping rules (e.g.) health can't be greater than max health
Declaration
void PreAttributeChange(IAttribute Attribute, ref float NewValue)
Parameters
| Type | Name | Description |
|---|---|---|
| IAttribute | Attribute | |
| System.Single | NewValue | New value of the attribute. This is passed as ref, so this method can modify it. |
PreGameplayEffectExecute(GameplayEffect, GameplayModifierEvaluatedData)
Decides whether this attribute change should take effect
Declaration
bool PreGameplayEffectExecute(GameplayEffect Effect, GameplayModifierEvaluatedData EvalData)
Parameters
| Type | Name | Description |
|---|---|---|
| GameplayEffect | Effect | Effect being executed |
| GameplayModifierEvaluatedData | EvalData | Attribute modifier |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if attribute change should take effect, false otherwise |