The Ability System is a framework for creating extensible and reusable gameplay abilities in Verse. With this system, you can create gameplay abilities that grant the player magic spells, superpowers, or other special capabilities.
Before you begin, you should be familiar with Scene Graph, including entities, components, and prefabs.
Core Concepts
Every ability consists of four parts:
Ability - Defines the ability and its requirements.
Context - Stores contextual data for a single ability activation.
Effect - Is the spawned gameplay entity.
Effect Component - Controls the effect's behavior and lifetime.
Separating ability activation, runtime data, gameplay logic, and lifetime management into distinct layers makes abilities easy to extend and reuse. As a result, you can create many variations of the same ability without duplication.
Ability
An ability is a persistent definition that governs when it can be used and creates the gameplay effect in the given context.
Abilities store references to the context and effect types they expect to work with. This provides type safety throughout the activation process, meaning mismatched types are caught during development, rather than during gameplay.
An ability is responsible for:
Validating activation against a set of restrictions, such as cooldown or resource cost
Creating the context
Creating the effect
Tracking active effects
Broadcasting begin and end lifecycle events
Ability Context
An ability_context is a temporary container for contextual data related to a single ability activation. The base context provides:
Instigator- The agent activating the ability.Participants- The entities related to the ability, such as weapons or other players, that aren't direct targets.Targets- The entities receiving the ability's effects.
Ability Effect and Effect Component
The ability_effect is the transient spawned gameplay entity. The effect is typically defined as a prefab with suitable visual, audio, and other supporting components attached.
The ability_effect_component is attached to the ability_effect entity and controls the effect's runtime behavior and lifecycle. The effect component also has access to the related ability and context.
Learn More
See the following pages to learn more about the ability system.
Create Your First Ability - Learn how to create a simple periodic healing ability.
Fortnite Template Abilities - Create simple and responsive timeline-driven Fortnite abilities.
Fortnite Template Ability Quickstart - Build your first Fortnite template ability.
Ability and Effect Lifecycle - A reference for the lifetime of abilities and effects.
Verse Abilities API - Learn technical details about the Abilities module.