Preface
AbilitySystemComponent, abbreviated as ASC, is the core component of the AbilitySystem.
What we are going to discuss this time is the GameplayTag event handling in ASC.
Traditionally, event handling in games is generally in the form of a TMap<event name, event multicast callback>. In the AbilitySystem, event names are replaced by GameplayTags, allowing events to be triggered on ASC and listening to a specific event on ASC.
The following definitions exist in ASC:
1TMap<FGameplayTag, FGameplayEventMulticastDelegate> GenericGameplayEventCallbacks;
Tag event, stores a single GameplayTag and the corresponding multicast delegate, used to register a single Tag exact match event.
1TArray<TPair<FGameplayTagContainer, FGameplayEventTagMulticastDelegate>> GameplayEventTagContainerDelegates;
Tag container event. Stores a Tag container (multiple Tags) and the corresponding multicast delegate. Used for any Tag matching event.
Event binding/unbinding:
For Tag events (essentially a Map), you can directly bind to the delegate.
1MyHandle = ASC->GenericGameplayEventCallbacks.FindOrAdd(Tag).AddUObject(this, &UAbilityTask_WaitGameplayEvent::GameplayEventCallback);2ASC->GenericGameplayEventCallbacks.FindOrAdd(Tag).Remove(MyHandle);
For Tag container events, use AddGameplayEventTagContainerDelegate and RemoveGameplayEventTagContainerDelegate.
Event triggering:
You can trigger the specified Tag corresponding event on ASC through SendGameplayEvent, where Target is the target ASC. It will internally call HandleGameplayEvent on the target ASC, and as long as there is an event that matches the specified Tag, the callback will be executed, and GameplayEventData can also be passed to store the data involved in the event.

Listen to Tag/Tags events in Blueprints.
The GameplayAbilities plugin also provides AbilityTask_WaitGameplayEvent by default to facilitate event listening in Blueprints.
OnlyMatchExact determines whether the event is bound to Tag events or Tag container events.

Finally, please note that Tag events in ASC do not have any network synchronization logic. For the server/client versions of the same ASC component, if an event is triggered on the server, it must be listened to on the server side to be triggered.

