You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On confirming TargetActors using EGameplayTargetingConfirmation::Custom, the docs suggest using UGameplayAbility::ConfirmTaskByInstanceName
Currently it reads
The GameplayTargeting Ability is responsible for deciding when the targeting data is ready by calling UGameplayAbility::ConfirmTaskByInstanceName(). The TargetActor will also respond to UGameplayAbility::CancelTaskByInstanceName() to cancel targeting.
But sometimes you don't want the ability to tell the target actor that it's ready. For example, you may want to spawn a hitbox for a few seconds and return the first successful hit as target data. Then, the ability couldn't possibly know when to confirm the task, since the ability doesn't know about the internals of the target actor (and shouldn't).
But this function goes through an external confirm pipeline. So in this case where the target actor itself is in charge of filtering and selecting the target data, semantically it seems that using this method is a bit like telling somebody else to tell me to do something.
In my custom target actor, when I have what I want I just call the exec pin directly via the automatically bound TargetActor delegates.
const auto TargetDataHandle{MakeTargetData(Hit)};
TargetDataReadyDelegate.Broadcast(TargetDataHandle);
See AbilityTask_WaitTargetData line 145 to see where the task is binding these delegates
So my suggestion is just adding an extra line to the Custom and CustomMulti types, such as
The GameplayTargeting Ability is responsible for deciding when the targeting data is ready by calling UGameplayAbility::ConfirmTaskByInstanceName(). The TargetActor will also respond to UGameplayAbility::CancelTaskByInstanceName() to cancel targeting.
If the TargetActor is the one deciding when the data is ready, call the delegate directly via TargetDataReadyDelegate.Broadcast(Data) or alternatively CanceledDelegate.Broadcast
The text was updated successfully, but these errors were encountered:
On confirming TargetActors using EGameplayTargetingConfirmation::Custom, the docs suggest using UGameplayAbility::ConfirmTaskByInstanceName
Currently it reads
But sometimes you don't want the ability to tell the target actor that it's ready. For example, you may want to spawn a hitbox for a few seconds and return the first successful hit as target data. Then, the ability couldn't possibly know when to confirm the task, since the ability doesn't know about the internals of the target actor (and shouldn't).
But this function goes through an external confirm pipeline. So in this case where the target actor itself is in charge of filtering and selecting the target data, semantically it seems that using this method is a bit like telling somebody else to tell me to do something.
In my custom target actor, when I have what I want I just call the exec pin directly via the automatically bound TargetActor delegates.
See AbilityTask_WaitTargetData line 145 to see where the task is binding these delegates
So my suggestion is just adding an extra line to the Custom and CustomMulti types, such as
The text was updated successfully, but these errors were encountered: