Let's talk

RSExampleDashAbility.h

Examples/RSExampleDashAbility.h Raw Download ZIP

Click a line number to link it. Shift-click to select a range.

1// Copyright (c) 2026 Reignance Studios. MIT License, see LICENSE.
2// Example only: a predicted ability with a stamina cost and a cooldown.
3// Tutorial: https://reignancestudios.com/tutorial-gas-predicted-cost-cooldown
4
5#pragma once
6
7#include "CoreMinimal.h"
8#include "Abilities/GameplayAbility.h"
9#include "RSExampleDashAbility.generated.h"
10
11UCLASS()
12class URSExampleDashAbility : public UGameplayAbility
13{
14 GENERATED_BODY()
15
16public:
17 URSExampleDashAbility();
18
19 virtual void ActivateAbility(
20 const FGameplayAbilitySpecHandle Handle,
21 const FGameplayAbilityActorInfo* ActorInfo,
22 const FGameplayAbilityActivationInfo ActivationInfo,
23 const FGameplayEventData* TriggerEventData) override;
24
25protected:
26 UPROPERTY(EditDefaultsOnly, Category = "Dash")
27 float DashStrength = 1500.f;
28};

Still desyncing in packaged builds?

Free code fixes one symptom. A Diagnostic finds the cause across your project in two days.