AGameplayAbilityTargetActor

TargetActors are spawned to assist with ability targeting.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/GameplayAbilityTargetActor.h

Include

#include "Abilities/GameplayAbilityTargetActor.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Blueprintable, Abstract, NotPlaceable)
class AGameplayAbilityTargetActor : public AActor

Remarks

TargetActors are spawned to assist with ability targeting. They are spawned by ability tasks and create/determine the outgoing targeting data passed from one task to another

WARNING: These actors are spawned once per ability activation and in their default form are not very efficient For most games you will need to subclass and heavily modify this actor, or you will want to implement similar functions in a game-specific actor or blueprint to avoid actor spawn costs This class is not well tested by internal games, but it is a useful class to look at to learn how target replication occurs

Variables

Name Description

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite Replicated

bool

 

bDebug

Draw the debug information (if applicable) for this targeting actor.

Public variable UProperty Category BlueprintReadOnly Replicated

bool

 

bDestroyOnConfirmation

Public variable

FAbilityTargetD...

 

CanceledDelegate

Public variable UProperty Category, Meta BlueprintReadWrite Replicated

FGameplayTarget...

 

Filter

Public variable

FDelegateHandle

 

GenericCancelHandle

Public variable

FDelegateHandle

 

GenericConfirmHandle

Public variable UProperty

UAbilitySystemC...

 

GenericDelegateBoundASC

Public variable UProperty Category BlueprintReadOnly

APlayerControll...

 

MasterPC

Public variable UProperty

UGameplayAbilit...

 

OwningAbility

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

TSubclassOf< AG...

 

ReticleClass

Reticle that will appear on top of acquired targets.

Public variable UProperty Category, Meta BlueprintReadWrite

FWorldReticlePa...

 

ReticleParams

Parameters for world reticle. Usage of these parameters is dependent on the reticle.

Public variable UProperty Category, EditAnywhere

bool

 

ShouldProduceTargetDataOnServer

The TargetData this class produces can be entirely generated on the server.

Public variable UProperty Category BlueprintReadOnly Replicated

AActor *

 

SourceActor

Public variable UProperty Category, Meta BlueprintReadOnly Replicated

FGameplayAbilit...

 

StartLocation

Describes where the targeting action starts, usually the player character or a socket on the player character.

Public variable

FAbilityTargetD...

 

TargetDataReadyDelegate

Constructors

Name Description

Public function

AGameplayAbilityTargetActor

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual

void

 

BindToConfirmCancelInputs()

Public function Virtual UFunction

void

 

CancelTargeting()

Outside code is saying 'stop everything and just forget about it'

Public function Virtual UFunction

void

 

ConfirmTargeting()

Outside code is saying 'stop and just give me what you have.' Returns true if the ability accepts this and can be forgotten.

Public function Virtual

void

 

ConfirmTargetingAndContinue()

Requesting targeting data, but not necessarily stopping/destroying the task.

Public function Virtual

bool

 

IsConfirmTargetingAllowed()

Public function Virtual Const

bool

 

OnReplicatedTargetDataReceived

Replicated target data was received from a client.

Public function Virtual Const

bool

 

ShouldProduceTargetData()

Public function Virtual

void

 

StartTargeting

(
    UGameplayAbility* Ability
)

Initialize and begin targeting logic

Overridden from AActor

Name Description

Public function Virtual

void

 

EndPlay

(
    const EEndPlayReason::Type EndPlayR...
)

Overridable function called whenever this actor is being removed from a level

Public function Virtual Const

bool

 

IsNetRelevantFor

(
    const AActor* RealViewer,
    const AActor* ViewTarget,
    const FVector& SrcLocation
)

Checks to see if this actor is relevant for a specific network connection

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss