This is also done based on EventListener custom events.

This is the second way to listen to events. It is different from the first way. The first way is based on events. You must enable the event listener (EnableEventListener) at BeginPlay. Here, it listens through functions, so replication is not supported. You need additional coding to implement network replication. It is automatically registered when it is first executed without other auxiliary functions. The general style is as follows:

Untitled

1. Interactive Messages

EventTag: (TagName="InteractionSystem.ToggleInteractableMessage")

Customized event notifications for the interactive system: switching interactive messages; generally used to switch UI prompts or to initiate some possible initialization operations within an object before starting an interactive action.

Untitled

3. Start interactive event

EventTag: (TagName="InteractionSystem.Interact")

Customized event notification for the interactive system: Start executing interactive events; usually triggered by a player pressing a certain button or other input method. Here is to handle specific interactive events (such as opening a door, putting items into a backpack, or other)

Untitled

4. End interaction event

EventTag: (TagName="InteractionSystem.EndInteract")

Customized event notifications for the interactive system: the end of an interactive event; this event is usually triggered when the player releases a key or other input method, or when the player no longer focuses on the object. You can implement this or not as needed. This is just an example.

Untitled