Skip to content

MotionAbilitySystemHelper

Helper functions for integrating Motion with Unreal’s Gameplay Ability System (GAS). Provides utilities for input binding, ASC lookup/initialization, gameplay tags, and effect-based tag application.

Functionality

FunctionDescription
GetEnhancedInputComponentFromActor(Actor, bLogErrors=false)Returns the actor’s UEnhancedInputComponent, or nullptr if not found.
GetAbilitySystemComponentFromActor(Actor, bLogErrors=false)Finds an UAbilitySystemComponent on the Actor or its PlayerState.
ActorHasGameplayTag(Actor, Tag)Checks whether the actor’s ASC has the specified gameplay tag.
AddGameplayTagToActor(Actor, Tag)Adds a loose gameplay tag to the actor’s ASC.
RemoveGameplayTagFromActor(Actor, Tag)Removes a loose gameplay tag from the actor’s ASC.
ApplyGameplayTagEffect(Actor, EffectClass)Applies a UGameplayEffect that grants tags; returns an active effect handle.
RemoveGameplayTagEffect(Actor, EffectHandle)Removes a previously applied tag‑granting effect by handle.
ApplyTagEffectFromClass(Actor, EffectClass, FallbackTag)Applies EffectClass, or falls back to adding FallbackTag as a loose tag.
InitializeCharacterAbilitySystem(Character, bLogErrors=true)Initializes ASC owner/avatar bindings for a character.
InitializeCharacterAbilitySystemWithAttributeSet(Character, AttributeSetClass, bLogErrors=true, AttributeDataTable=nullptr, bLogDataTableDetails=false)Initializes ASC and ensures an UAttributeSet exists; optionally initializes values from a DataTable.
InitializeAttributeSetFromDataTable(ASC, AttributeDataTable, AttributeSetClass=nullptr, bLogDetails=false)Calls InitFromMetaDataTable on one or all AttributeSets in the ASC.

Motion - Advanced First Person Character Controller