Welcome.
We've now come to the part of the course where we talk about gameplay abilities.
Now these are at the heart of the gameplay ability system.
Gameplay abilities are actions or skills that an actor can perform in the game.
It's a class derived from you gameplay ability and it defines what an ability does and the conditions
under which it can be used.
So rather than implementing an action with a simple function, a gas gameplay ability is an instance
object running asynchronously.
This means that it can be activated at some point in time and run multi-stage tasks that may or may
not span across periods of time.
These can potentially branch off into different tasks, apply their own gameplay effects, and once
we learn about gameplay queues, we'll see that they can kick off those as well.
And these can be conditional.
They may be based on player or environmental interaction, gameplay abilities have built in replication
and prediction support, much like gameplay effects.
Gameplay abilities also have the built in concept of cost and cooldown where attribute resources must
be present in a sufficient amount to pay for an ability activation.
In this course, we'll implement this cost mechanic using mana as the resource, but it could literally
be anything and cooldown periods prevent an ability from being activated again until the cooldown period
is over.
Gameplay abilities use ability tasks although they don't have to ability tasks are derived from the
class you ability task which is a more specialized form of the more general gameplay task class.
These perform asynchronous work during a gameplay abilities execution.
They can affect execution flow by broadcasting delegates.
These tasks can be used in C plus plus, but they can also appear in blueprint in the form of a specialized
blueprint node that can have multiple output execution pins.
These are executed as a result of delegate broadcasts made in response to occurrences determined by
the developer.
Basically, something happens in the game.
Your ability task will broadcast a delegate and in blueprint.
This means that that particular output execution pin on the task node will be executed.
This allows us to easily map out an abilities control flow in blueprint and we can still enjoy the benefit
of optimal performance of C plus plus as the work being done by the task is often done on the C plus
plus side, although it doesn't have to be.
But because we can make these ability tasks and make them do the bulk of their work in C plus plus,
we gain the flexibility of being able to design the mechanics of a gameplay ability in the abilities
blueprint and allow designers who don't have access to the C plus plus domain to have more control over
the ability without sacrificing on performance.
To use a gameplay ability, the ability system component must be granted the ability.
When this happens, a gameplay ability spec is created and the spec defines the details pertaining to
that particular ability, including the gameplay ability, class itself, the abilities level and any
dynamic information that can be changed at runtime.
Abilities are typically granted on the server, but when this happens the ability spec replicates down
to the owning client so they can activate it from their gameplay abilities.
Have the concept of activation.
Once activated abilities are said to be active until they are either ended or canceled.
Abilities can end themselves as well as be canceled externally.
So in summary, gameplay abilities are classes that define a given skill or spell or any type of ability
that can be performed by an actor.
Abilities must be granted to an ability system component to be used, and we do this on the server,
at which point an ability spec is granted and replicated down to the owning client.
To use an ability, it must be activated.
It's then considered to be active until it's ended or cancelled.
Abilities have the built in concepts of cost and cooldown.
Abilities can be run asynchronously and multiple abilities can be active at one time.
An abilities can run ability tasks which are asynchronous actions that encapsulate behaviors into individual
classes, each of which can perform their own particular job.
So abilities are quite useful.
And now that we're able to start using them, we'll be able to give our character some really cool capabilities
and make this game a lot more interesting.
And we'll start making our first ability in the videos to come.
I'll see you soon.