-
Gameplay Cue
- Encapsulates cosmetic effects
-
Gameplay Effects
-
Instant changes to the Attribute's base value.
-
Temporary changes
(often called "Buffs" or "Debuffs")
-
Persistent changes applied over time, like a health regeneration effect
-
Gameplay Attributes
-
Inherit public UAttributeSet
-
FGameplayAttributeData Health;
- They are generally modified by
Gameplay Effects.
- Once you have created an AttributeSet,
you must register it with the AbilitySystemComponent.
- Encapsulates 'state' in float values
-
Revoking Abilities
-
Execution lifecycle
- CanActivateAbility
- CallActivateAbility
- CommitAbility
-
EndAbility
- Always call EndAbility to end correctly! Except when we CancelAbility.
- TryActivateAbility
- After being granted to an Actor's
Ability System Component
-
Granting access to Ability
-
Ability System Component
- GiveAbility
- GiveAbilityAndActivateOnce
- ClearAbility
- SetRemoveAbilityOnEnd
- ClearAllAbilities
- Using the FGameplayAbilitySpecHandle that was returned when the Ability was granted
-
Triggering with Gameplay Events
- Can trigger Ability with a payload GameplayEventData
-
Some GameplayAbility properties
-
Replication Policy
- Do Not Replicate
- Replicate
-
Instancing Policy
-
Non Instanced
- Doesn't spawn. Great for abilities that run frequently, like shoot
• C++ only
• Must not change member variables
• Must not bind Delegates
• Can not replicate variables or handle RPCs
-
Instanced Per Actor
- Spawns once and reuse it for future executions.
• Network efficient: no spawn/destroy
• Can hold variables, have delegates bindings, RPC's, etc.
-
Instanced Per Execution
- Spawns each time the ability runs.
-
Net Execution Policy
- Local Predicted
- Local Only
- Server Initiated
- Server Only
-
Net Security Policy
- Client Or Server
- Server Only Execution
- Server Only Termination
- Server Only
-
Cancel Abilities Matching Tag Query
-
Each Ability has Gameplay Tags
-
Ability Tags
- The Gameplay Tags this ability has
-
Cancel Abilities With Tag
- Cancels any already-executing Ability
-
Block Abilities With Tag
- Prevents execution of any other Ability
-
Activation Owned Tags
- Tags to apply to activating owner
-
Activation Required Tags
- Only run ability if activating object has all of these tags
-
Activation Blocked Tags
- Block ability if activating object has any of these tags
-
Source Required Tags
- Only run ability if the source object has all of these tags
-
Source Blocked Tags
- Block ability if the source object has any of these tags
-
Target Required Tags
- Only run ability if the target object has all of these tags
-
Target Blocked Tags
- Block ability if the source object has any of these tags
-
Triggering a GameplayEffect when Ability is commited
-
"Cost Gameplay Effect Class"
- Represents the cost
-
"Cooldown Gameplay Effect Class"
- Represents the cooldown
-
Ability triggers array
- Trigger Tag
-
Trigger Source
- Gameplay Event
- Owned Tag Added
- Owned Tag Present