Hello guys. I know this question propably has already been answered many times, but this is my first try on multiplayer and replication and i still cant seem to get it working. In the character blueprint i set up a simple line trace that calls the apply damage node to cause damage to the hit player.
On Event AnyDamage i subtract the applied damage from the health variable. I set the health variable to replicated, but i can only damage the client from the server. if i play as a client, i can’t damage the server
This works, thank you very much. I didnt do this at first because the apply damage node itself sais “Authority only, will only execute on server”, so i thought this would be unnecessary. Cant thank you enough
Hi , can you show me how you fixed the issue? I tried the above but I cant find a way to call the event any damage from a custom event. I’m really confused, I tried everything but nothing works. My blueprint is exactly the same as yours. thx
After the line trace instead of calling ‘Apply Damage’ directly i pass the hit results to a custom event called ‘Apply Damage’, which only runs on the server. and then this custom event calls the real ‘Apply Damage’ function and passes the hit results to it.