Examples¶
Complete, end-to-end ability implementations. Each example walks through the full GAS loop — effects, ability blueprint, input wiring, and testing — so you can follow along from scratch or use them as reference for your own abilities.
Every example is standalone. You can jump to any one without reading the others.
Looking for a simpler starting point?
The Getting Started section includes a jump ability tutorial — the simplest possible GAS ability. Start there if you're new, then come back here for more complex examples.
The Examples¶
Beginner¶
| Example | What It Demonstrates |
|---|---|
| Sprint Toggle | Toggle/held ability, infinite-duration effects, periodic stamina drain, WaitInputRelease. |
Intermediate¶
| Example | What It Demonstrates |
|---|---|
| Dodge Roll | Stamina cost, cooldown, i-frames via Activation Owned Tags, root motion, ability blocking. |
| Melee Attack | Animation-driven hit timing, SetByCaller damage, montage lifecycle, gameplay events. |
| Ranged Attack | Projectile spawning, passing GE specs to actors, mana cost, aim direction, travel-time damage. |
| Passive Aura | Passive activation, periodic area scanning, applying effects to other actors' ASCs, handle tracking. |
Advanced¶
| Example | What It Demonstrates |
|---|---|
| Custom Damage Calculation | UGameplayEffectExecutionCalculation, attribute captures, elemental resistance, crit formula. C++ only. |
| Network-Predicted Ability | Client-side prediction, predict-confirm-reject cycle, FScopedPredictionWindow, multiplayer. C++ only. |
What You Need¶
All examples assume you've completed Project Setup and have:
- A character with an Ability System Component
- An AttributeSet with at minimum Health, Stamina, and Mana
- A base ability class (
YourProjectGameplayAbility) with an InputTag property - An input binding system that routes Enhanced Input actions to abilities by tag
If any of that is missing, start with Project Setup.