OnRepNotify doesn't work!
I have a projectile class and I need to let the CLIENTS know whenever an Explosive Projectile explodes.
To do this, I decided to use a RepNotify variable bExploded and a OnRep_Exploded function
Here is the code:
The problem is that the function OnRep_Exploded doesn't seem to be fired, since the DebugMessage inside of it doesn't get displayed!!!
You probably destroy the AProjectile after Explode is executed. In that case, further replication is not performed, the server tells the client to destroy its copy of the actor and that is all.
I had a similar problem and I solved it by replicating explosions on a multicast RPC on the GameState. This makes the explosion position exact (because if you do it on EndPlay, the destroyed actor will not have its last position update).
I don't know which solution is best in terms of performance though.
answered May 03 '16 at 08:32 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here