Overview
WCGASAICombatComp is a central ActorComponent that bridges AI decision-making with the Gameplay Ability System. It manages threat tracking, combat state transitions, GAS attribute queries, and ability activation—all without requiring inheritance. The component uses composition to work with any AI setup, automatically discovers the owner's AbilitySystemComponent, and integrates with squad systems for role-based threat modifications.
Core Functionality
- Tracks per-target threat values with automatic decay and modifier support
- Manages combat state machine (Idle → Engaging → Retreating → Dead)
- Provides GAS attribute queries via tag-based lookup
- Offers ability activation helpers (by tag or class)
- Handles taunt effects with forced target priority
- Generates threat from damage, healing, status effects, taunts, transfers, overflow events, evolutions, and synergies
- Integrates with squad system for role-based threat multipliers
- Supports difficulty-based threat configuration overrides
- Broadcasts combat events through subsystem for squad awareness
- Replicates combat state to clients for UI synchronization
- Registers with UWCGASAICombatSubsystem for global combat queries
Initialization Flow
Automatic Initialization (Default Behavior):
- Component reaches BeginPlay
- Caches references to owner's AbilitySystemComponent, StatusEffectComponent, SquadComponent, and AIController