Download

OnTakeDamage for client C++

I have looked everywhere for a solution to this and they are all in blueprint and I cannot seem to figure out how to convert it over. Basically what is happening is that I can do damage from the server to the AI controlled monsters but not from the client. The Weapon code basically uses OnCombatOverlapBegin and it is doing everything in that function, I put a ue_log right below the ApplyDamage function and it is being called. I show the MonsterHealthComponent class and how that is working. Everything works perfectly from the server but not the client and I cannot seem to figure out why. I had it working for the longest time and then I changed a few things that were unrelated and have not had success since. Hopefully you guys can help!