Apply Damage From Client to Server in C++
So I have been searching for hours now but could not find a solution to this and replication still confuses me a bit, especially in C++. I want my Characters to be able to apply damage to eachother but this only works from server to client so how can I get this to work in the opposite direction?
My code right now (a bit condensed):
asked Aug 21 '18 at 01:33 AM in C++ Programming
You definitely wouldn't want it to work in the opposite direction. Unreal Engine uses an Authoritative Server model, meaning the server has control over replicated values. This is to prevent hacking of important variables such as health on the client side. You should do all of your hit detection on the server.
answered Aug 21 '18 at 03:02 PM
In blueprints there is a server function ApplyDamage. It is probably there in C++ too
answered Dec 07 '18 at 06:14 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here