RealDocs

UAbilitySystemComponent::ClientSetReplicatedEvent

function GameplayAbilities Since 4.15
#include "AbilitySystemComponent.h"
Access: public Specifiers: UFUNCTIONClientreliable

Description

Reliable client RPC sent by the server to notify the owning client that a generic replicated event has occurred, allowing server-driven ability flow steps to trigger locally.

Caveats & Gotchas

  • This does not carry a CurrentPredictionKey — it is intentionally simpler than the server variant because the server is authoritative when pushing events to clients.
  • Do not confuse with ServerSetReplicatedEvent: this RPC travels server→client while the Server variant travels client→server.

Signature

void ClientSetReplicatedEvent(EAbilityGenericReplicatedEvent::Type EventType, FGameplayAbilitySpecHandle AbilityHandle, FPredictionKey AbilityOriginalPredictionKey)

Parameters

Name Type Description Default
EventType EAbilityGenericReplicatedEvent::Type The type of generic replicated event the server is pushing to the client.
AbilityHandle FGameplayAbilitySpecHandle Handle to the ability spec this event belongs to.
AbilityOriginalPredictionKey FPredictionKey The prediction key that was active when the ability was activated.

Return Type

void

Example

Flow overview for a server-driven event C++
// Server ability logic decides to notify the owning client:
// ASC->ClientSetReplicatedEvent(
//     EAbilityGenericReplicatedEvent::GenericConfirm,
//     Handle, OriginalPredictionKey);
// On the client, InvokeReplicatedEvent fires the registered delegate.

Version History

Introduced in: 4.15

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.