I am trying to figure out an easy way to replicate damage done to a wall, on the client side instead of just the server side. Could someone help me through this ?
If your Wall has a replicated Health Variable and you apply Damage to it (server side) the health variable will be updated on the client too.
So if the server applies damage and you have some logic that gets called if the health reaches 0, the wall should react to it on the client side.
I’v achieved destruction damage done to a wall from server side replicated to client side, but only with a projectile. Problem is I am using a line trace to deal the damage. Is it possible to use a linetrace to trigger destruction and can the damage be replicated back to the server side if let’s say the client damages the wall ?
You could create a Server RPC, so when the client wants to fire, he tells it the server, who does the line trace, calculates the hit an then does a NetMulticast RPC that triggers the destruction on every machine.
But keep in mind that the physic simulation of the destructible is not replicated, so the simulation itself will be different on every machine.