So I ran into a weird issue and I’m not able to fix it. So I’m making a multiplayer game. When 2 clients are fighting and the Host is far from them, the score doesn’t update. I do the score logic in my TakeDamage virtual function when Health is below 0 and that is wrapped in a HasAuthority() check. So I get the EventInstigator, get the PlayerState from it and increment score. This does not work when the Host is far away. Same with game state variables, they don’t update when Host is far away. I can’t remove HasAuthority because EventInstigator will be null on Clients and will crash. What am I supposed to do?
APlayerState score doesn't update when Host is far from Clients
Hey there, that might be because of the net culling distance. To save on network bandwidth he doesn’t send replication commands based on a certain distance.
Oh yea, should have mentioned. That’s what I thought too so I changed the Net Culling Distance on my character class. I made it 20 times the default and it didn’t make any difference. There were instances where it will work sometimes when the Host is half way across the map but at the same spot later, it doesn’t work. When the Host approaches the 2 Clients fighting, everything suddenly works.
I had an issue before where Clients weren’t dying when Host is far away. So I made the Death/Respawn happen outside the HasAuthority check and it works. But I can’t do the same for the score logic because of the EventInstigator.
I’m not sure, but you might need to increase the net culling distance from the player state blueprint.
Did you try enabling “Always Relevant”?
yes I’ve done that
That didn’t work either