Skip to content

GAS Quick Reference

This page is a short reference for the Gameplay Ability System concepts that Motion uses. For detailed explanations, read GAS concepts in Motion.

The 5 Core Concepts

AbilitySystemComponent

The AbilitySystemComponent controls GAS state. In Motion, the PlayerState usually owns it. Motion finds it through IAbilitySystemInterface or supported ASC-component fallbacks on the actor or PlayerState.

Attributes

Attributes are numeric values such as speed and stamina. The default Motion set includes WalkSpeed, Stamina, MaxStamina, and the optional JumpVelocity path.

Effects

GameplayEffects change attributes and grant tags. Motion uses them for sprint speed boosts, stamina drain, stamina regeneration, and movement state.

Tags

GameplayTags are hierarchical state labels. Motion uses tags such as Motion.State.Sprinting and Motion.State.Crouching.

Abilities

GameplayAbilities are actions that input, game code, or gameplay events can activate. Ability activation is not necessary for Motion component movement. Motion uses GAS state for replication and coordination.

Quick setup checklist

text
1. For the recommended networked setup, let PlayerState own AbilitySystemComponent.
2. Expose the ASC through IAbilitySystemInterface or a supported component fallback.
3. On authority, let Motion create UMotionAttributeSet if the ASC does not have one.
4. Configure GameMode to use your PlayerState class.
5. Let Motion components find the ASC.

Motion Gameplay Tags

State Tags

  • Motion.State.WantsToSprint: sprint input intent.
  • Motion.State.Sprinting: active sprinting state.
  • Motion.State.WantsToCrouch: crouch input intent.
  • Motion.State.Crouching: active crouching state.
  • Motion.State.WantsToJump: jump input intent.
  • Motion.State.Jumping: in air from jump.
  • Motion.State.HoldingItem: character is holding a first-person item.
  • Motion.State.StaminaDepleted: sprint stamina is exhausted.
  • Motion.State.StaminaRegenBlocked: stamina regeneration is on cooldown.
  • Motion.State.Walking: character is grounded and its platform-relative speed meets MinWalkVelocity.
  • Motion.State.MovementHalted: Declared for project use. Current Motion components do not set it.
  • Motion.State.StaminaRegenerating: stamina is actively regenerating.

Camera Tags

  • Motion.Camera.BreathingActive: camera breathing effect is active.
  • Motion.Camera.DisableShake: camera shake effects are temporarily disabled.

SetByCaller Magnitude Tags

  • SetByCaller.Magnitude.WalkSpeed: walk speed modification.
  • SetByCaller.Magnitude.CrouchSpeed: crouch speed modification.
  • SetByCaller.Magnitude.SprintSpeed: sprint speed modification.
  • SetByCaller.Magnitude.StaminaDrain: stamina drain rate.
  • SetByCaller.Magnitude.StaminaRegen: stamina regeneration rate.

Motion Gameplay Effects

Movement Effects

  • GE_Motion_WalkSpeed: infinite effect used for authoritative walk-speed changes.
  • GE_Motion_SprintSpeed: infinite effect that adds sprint walk speed.
  • GE_Motion_CrouchSpeed: infinite effect that applies crouch walk speed reduction.
  • GE_Motion_JumpVelocity: Supplied optional effect asset. Current Motion source and default profiles get jump velocity from the jump profile.

Stamina Effects

  • GE_Motion_SprintStaminaDrain: infinite effect that drains stamina while sprinting.
  • GE_Motion_SprintStaminaRegen: infinite effect that regenerates stamina when not sprinting.
  • GE_Motion_SprintStaminaRegenDelay: duration effect that blocks regeneration after exhaustion.

Tag Effects

  • GE_Motion_Walking: grants Motion.State.Walking.
  • GE_Motion_WantsToSprint: grants Motion.State.WantsToSprint.
  • GE_Motion_Sprinting: grants Motion.State.Sprinting.
  • GE_Motion_WantsToCrouch: grants Motion.State.WantsToCrouch.
  • GE_Motion_Crouching: grants Motion.State.Crouching.
  • GE_Motion_WantsToJump: grants Motion.State.WantsToJump.
  • GE_Motion_Jumping: grants Motion.State.Jumping.
  • GE_Motion_BreathingActive: grants Motion.Camera.BreathingActive.

Motion Attributes

  • WalkSpeed: The default is 600. This is the current effective walking speed. MotionWalkComponent initializes the base value from BaseWalkSpeed in its assigned profile.
  • Stamina: The default is 5.0. This is the current stamina.
  • MaxStamina: The default is 5.0. This is the maximum stamina.
  • StaminaDrainRate: The default is 1.0. This is the drain per second.
  • StaminaRegenRate: The default is 1.0. This is the regeneration per second.
  • JumpVelocity: The default is 420. This optional AttributeSet path synchronizes with CharacterMovementComponent::JumpZVelocity. MotionJumpComponent gets jump velocity from its profile.

Effect Duration Types

  • Instant: Executes once and does not enter the active-GameplayEffect container. Usually used for one-time changes such as damage.
  • Duration: temporary change with a timer, such as a 10-second speed buff.
  • Infinite: Remains active until you remove it. Sprint speed during sprinting is an example.

GAS patterns

Tag checks in Blueprint

text
Has Gameplay Tag (Actor, Tag) -> Boolean

Tag checks in C++

cpp
UMotionAbilitySystemHelper::ActorHasGameplayTag(Actor, Tag)

Effect application

Apply effects on the server.

cpp
FGameplayEffectContextHandle Context = ASC->MakeEffectContext();
FGameplayEffectSpecHandle Spec = ASC->MakeOutgoingSpec(EffectClass, 1.0f, Context);
if (Spec.IsValid())
{
    ASC->ApplyGameplayEffectSpecToSelf(*Spec.Data.Get());
}

Effect removal

cpp
ASC->RemoveActiveGameplayEffect(EffectHandle);

Debug commands

console
showdebug abilitysystem
log LogAbilitySystem Verbose
log LogGameplayTags Verbose
log LogMotionAbilitySystem Verbose

Common Issues

  • If tags do not replicate, use a GameplayEffect to grant tags. Do not use only loose tags.
  • If attributes do not synchronize, apply effects on the server with HasAuthority().
  • If Motion does not find the ASC, expose it through IAbilitySystemInterface. You can also attach it to an actor in the Motion lookup paths.
  • If effects do not apply, make sure that the expected AttributeSet exists on the ASC.

Next steps

Use the reference as a lookup, then move to the deeper conceptual or implementation pages.

Motion - Advanced First Person Character Controller