UE_LOG firing twice? use "if(HasAuthority())"

I think the lecturer might have set the player count back to 1?

If you have your play settings still set to 2 players, then both instances of the game (the server and the client) will notice the overlap event and dump into the same output log.

To fix wrap the UE_LOG in if(HasAuthority())

if (HasAuthority())
	UE_LOG(LogTemp, Warning, TEXT("Activated"));

Thankyou to Lennart in the Q/A


I’ve seen a lot of errors on this topic (I had it myself) and this is the solution. Sam’s code works as intended but I was getting the double notification as well. I’m operating in 5.1
1.) Putting it in event begin play didn’t help.
2.) Dropping down to 1 player only returned a single log event.
3.) Wrapping it in HasAuthority then setting it back to 2 players fixed everything.

1 Like

Privacy & Terms