how can i destroy 2 weapon actors that are attached to the player

In multiplayer there are 3 Proxies. Autonomous, Authority, and Simulated.
Here’s a graphic I worked up that highlights it better.

CMC docs covers this in more detail. Jump to the Movement Replication Summary section.

The same proxy structure applies to your weapons.

  • Servers copy (authority)
  • Your copy (autonomous)
  • Copy on your pawn on Player 2s screen (simulated)

When coding multiplayer this structure should be used throughout your code base. Proxy modulization.

  • Autonomous does this, that etc.
  • Server does this or that.
  • Sims only do this.

General flow logic to determine Auton, Authority, Simulated is as follows.

Instead of writing a function or macro that you execute whenever you need to know the role, you can have a simple function that sets the proxy role on begin play. Then reference the variable or have helper functions.


You can now easily determine the role of a class (pawn, controller) just by referencing the variable and using short chain logic in your code.

For actors attached/owned you can use an interface function to return the owning pawn/controller proxy role. Simply create a interface class and add it to your character… should do one on the controller as well. Then create functions to return the data as needed.

In the weapon class you’d use Get owner, and call the interface function. Very simple, no casting needed.

For your particular project you’d then use the switch (proxy role) and have the Client and Sim spawn a local TP variant, attach it etc.

When the server destroys the Authority weapon that command will get replicated down to all clients… Owner and the copies of you on other simulations. You will need to use the End Play event to handle destroying the TP variant. End play executes just before garbage collection.

Note the Bind Event to On End Play in the last pic.