Hi guys, I got a problem with multiplayer. I’m trying to deal damage to AI Enemies. But the damage it deals is always 0 no matter what damage numbers I pass on. From my understanding you have to run Apply Damage on server and then update the health on clients. But I don’t know how to update the health on clients. I tried some code, but the problem is that the damage that’s passed on to the Event Any Damage is always 0. How do I solve this?
BP_Sword has to be set to replicated or it can’t call rpc events. Alternatively you can set up damage logic on the player bp and interface to it (I do this because attachToActor and attachToComponent nodes are needlessly sticky on the server).
Ok I got it working by moving the code from BP_Sword to BP_PlayerCharacter! I detect a hit in BP_Sword, then I do Get Owner to get the BP_PlayerCharacter holding the sword. Then execute the rest of the code in PlayerCharacter