Call to parent Multicast event triggers multiple times on clients

Scenario: Base class has a custom Multicast event (pic 1). A Child of that Base class overrides and calls the parent event (pic 2).

99063-parent.png

What happens on the Sever: The server calls the Multicast event on a Child instance. (pic3) The Child instance’s custom Multicast fires, and it calls the parent custom event. Fin.

What happens on the Client: The Client’s custom multicast event fires, calls the parent custom event. ANOTHER custom multicast event fires, calls the parent custom event. Fin.

Why? It appears that when the server executes a call on the child multicast event, then the base multicast event both trigger RPC calls down to the client. So if I were to have a Child2 which is a child of the first child, the client would fire 3 times for a single server call. Is this expected behavior and is there a best practice to avoid?

I found a workaround. Basically this:
On the base class I add a function OnGrabbedFunc that is immediately called by the OnGrabbed multicast event. All of the previous logic in the multicast event is moved into the OnGrabbedFunc. Then on child classes instead of overriding the OnGrabbed multicast event, they instead implement and call the parent function of OnGrabbedFunc. (The multicast events are removed from the child classes, only the OnGrabbedFunc remains)

1 Like