I created this BP that should work online:
Now why the client can’t destroy the actor? As you can see i requested the destruction if it is client side.
I’m also new to this, but the remote pin means it’s a client and only server can call multicast. Who spawns this actor?
both the server and the client can’t destroy the wall. I need that the client ask to the server to destroy the wall…but how?
Only the playerController and Pawn have client ownership, so use it to do RPCs. An actor cannot communicate with the server, so put the code you have in PlayerController or Pawn.
This was my case.
How can i do?
Have you checked the ‘Network_Features’ map in Content Examples? Anyway, what is triggering ‘destroy’? It is cutoff in the image.
A simple variable that reach 0. BTW i never seen that map. I will try to take a look.
You can set the actor to replicated under class defaults. Destroying the actor on the servert will also destroy it on the client.
For getting the client input to the server, get an input action in the playercontroller and cast to a serversided event which executes the destroy actor node.
If you want to read the basics about actor replication, here is a link to the documentation page: